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

injectObjectId

beta

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

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