Skip to content
API referenceDevelopmentEngine APIEngine ccf7d03f
Synced
  • Builds a counted loop; each iteration receives the preceding iteration’s complete carried state.

API: engine
Project: Inno.Rendering.Shaders

public System.Collections.Generic.IReadOnlyDictionary<string, Inno.Rendering.Shaders.ShaderIrValue> Inno.Rendering.Shaders.ShaderIrBuilder.Loop(Inno.Rendering.Shaders.ShaderIrValue iterations, System.Collections.Generic.IReadOnlyDictionary<string, Inno.Rendering.Shaders.ShaderIrValue> initialState, System.Func<Inno.Rendering.Shaders.ShaderIrBuilder, Inno.Rendering.Shaders.ShaderIrValue, System.Collections.Generic.IReadOnlyDictionary<string, Inno.Rendering.Shaders.ShaderIrValue>, System.Collections.Generic.IReadOnlyDictionary<string, Inno.Rendering.Shaders.ShaderIrValue>> body)

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.

Final carried values in the enclosing scope; an empty state map permits effect-only loops.

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.