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

assignColor

Shortcuts:
Keywords:
  • color
  • material
  • modularmat
  • surface

Assigns a surface color attribute to an SDF surface.

Various types of materials and fields can access and use the surface color attributes.

Parameters

  • Enable:
  • Color:

Inputs

  • definition_in: (required) SDF definition to which the color is applied.
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: Sdf Particle
  • Color Field: (optional) Optional field used to calculate the color instead of the `Color` parameter.
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float vec4

Variables

  • sdf: