injectObjectId

beta
utility
injectObjectId
RayTK
v0.40

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

Name Description Regular Handling Read-Only Handling
Enable
Object Id Runtime Baked

Inputs

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