Skip to main content Link Menu Expand (external link) Document Search Copy Copied

switch

Keywords:
  • blend

Switches between several inputs, without the need to rebuild the shader, allowing for fast switching.

Note that inputs that are not connected are skipped over when assigning numbers to them, so if inputs 1, 2, and 4 are connected, they will use indices 0, 1, 2.

Parameters

  • Enable:
  • Source: When 0, the first source is used, 1 for the second, etc.
  • Blend Between Inputs:
  • Index Field:
  • Index Mode:
    • Index (0 .. N-1):
    • Index (1 .. N):
    • Normalized (0 .. 1):
  • Extend:
    • Clamp:
    • Loop:
    • Zig-Zag:

Inputs

  • definition_in_1: (optional)
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float vec4 Sdf Ray Light Particle
  • definition_in_2: (optional)
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float vec4 Sdf Ray Light Particle
  • definition_in_3: (optional)
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float vec4 Sdf Ray Light Particle
  • definition_in_4: (optional)
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float vec4 Sdf Ray Light Particle
  • definition_in_5: (optional)
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float vec4 Sdf Ray Light Particle
  • definition_in_6: (optional)
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float vec4 Sdf Ray Light Particle
  • definition_in_7: (optional)
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float vec4 Sdf Ray Light Particle
  • definition_in_8: (optional)
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float vec4 Sdf Ray Light Particle
  • indexField: (optional) Field used to choose the source index
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float