Synced
ShaderIrBuilder.Loop
Section titled “ShaderIrBuilder.Loop”
- Builds a counted loop; each iteration receives the preceding iteration’s complete carried state.
Required contracts
Section titled “Required contracts”API: scripting
Project: Inno.Rendering.Shaders
Scope: Editor
Declaration
Section titled “Declaration”public System.Collections.Generic.IReadOnlyDictionary<string, InnoEditor.Rendering.Shaders.ShaderIrValue> InnoEditor.Rendering.Shaders.ShaderIrBuilder.Loop(InnoEditor.Rendering.Shaders.ShaderIrValue iterations, System.Collections.Generic.IReadOnlyDictionary<string, InnoEditor.Rendering.Shaders.ShaderIrValue> initialState, System.Func<InnoEditor.Rendering.Shaders.ShaderIrBuilder, InnoEditor.Rendering.Shaders.ShaderIrValue, System.Collections.Generic.IReadOnlyDictionary<string, InnoEditor.Rendering.Shaders.ShaderIrValue>, System.Collections.Generic.IReadOnlyDictionary<string, InnoEditor.Rendering.Shaders.ShaderIrValue>> body)Parameters
Section titled “Parameters”Parameter iterations: Unsigned iteration count, evaluated once before entering the loop.
Parameter initialState: Named values used before the first iteration and returned unchanged for zero iterations.
Parameter body: Transient callback receiving its builder, uint iteration index and typed carried values.
Returns
Section titled “Returns”Final carried values in the enclosing scope; an empty state map permits effect-only loops.
Exceptions
Section titled “Exceptions”Exception T:System.ArgumentException: The count is not uint or the body’s output state changes names or types.
Exception T:System.InvalidOperationException: The body mutates the enclosing builder.