injectObjectId

beta
utility
injectObjectId
RayTK
v0.36

Assigns an arbitrary value to the objectId field of an SDF, which can later be extracted from rendered output.

This can be used to identify which object is shown at any given pixel in the output.

Parameters

  • Enable:
  • Object Id:

Inputs

  • SDF: (required)
    • Coordinate Types: float vec2 vec3 vec4
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: Sdf
  • ID Field: (optional)
    • Coordinate Types: float vec2 vec3 vec4
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float