Documentation

Unity Engine

Unity Engine

Render Objects Renderer Feature reference for URP

Explore the properties and settings of the Render Objects Renderer Feature, to configure how Unity draws objects.
Read time 6 minutesLast updated a month ago

View and edit the settings in the Render Objects Renderer Feature to draw objects at a specific point in the frame rendering loop in URP.

Properties

The Render Objects Renderer Feature contains the following properties.

Property

Description

NameDefines the name of the feature.
EventSets the injection point in the URP queue when Unity executes this renderer feature.

Filters

Property

Description

QueueRenders objects only from the selected queue. The options are:
  • Opaque: Renders objects only from the opaque render queue.
  • Transparent: Renders objects only from the transparent render queue.
Layer MaskRenders objects only from the selected layer.
LightMode tagsFilters shader passes by LightMode tag to render shader passes only with matching tags.

Overrides

Property

Description

Override ModeSets the material override mode. The options are:
  • None: Doesn't override the material or shader.
  • Material: Overrides the material and replaces all properties.
  • Shader: Overrides the shader only and maintains current properties.
MaterialReplaces the material assigned to an object with this material. This overrides all material properties with this material.

This property is available only when Override Mode is Material.
ShaderReplaces the material assigned to an object with this shader. This maintains all material properties and allows the override shader to access these properties.
Note: This is less performant and isn't compatible with the SRP Batcher.

This property is available only when Override Mode is Shader.
Pass IndexSets the pass index for the override material or shader.
DepthOverrides the depth buffer settings.
Write DepthWrites depth buffer values to the depth buffer when rendering objects.

This property is available only when Depth is enabled.
Depth TestSpecifies the comparison function used to determine when the renderer feature renders pixels of a given object. The options are:
  • Disabled: Doesn't perform a depth test.
  • Never: The pixel never passes the depth test.
  • Less: Passes if the incoming depth value is less than the stored depth.
  • Equal: Passes if the incoming depth value equals the stored depth.
  • Less Equal: Passes if the incoming depth value is less than or equal to the stored depth.
  • Greater: Passes if the incoming depth value is greater than the stored depth.
  • Not Equal: Passes if the incoming depth value isn't equal to the stored depth.
  • Greater Equal: Passes if the incoming depth value is greater than or equal to the stored depth.
  • Always: The pixel always passes the depth test.
This property is available only when Depth is enabled.
Set As Input AttachmentReads depth as a read-only input attachment from on-chip memory instead of sampling the depth texture, which reduces memory bandwidth on tile-based GPUs. To read the depth value in a shader, refer to Get the current depth buffer from GPU memory in URP.

If you enable this property, Unity overrides Write Depth and Depth Test, and the renderer feature ignores any Stencil overrides.

This property is available only when Depth is enabled.
StencilProcesses and overrides the stencil buffer values.
For more information, refer to ShaderLab: Stencil.
ValueSets the reference value to compare against the value in the stencil buffer. Unity writes this value to the buffer if Pass is Replace.

This property is available only when Stencil is enabled.
Compare FunctionCompares the value in Value with the value in the stencil buffer for each pixel. The options are:
  • Disabled: Doesn't perform a stencil test.
  • Never: The stencil test never passes.
  • Less: Passes if the reference value is less than the stencil buffer value.
  • Equal: Passes if the reference value equals the stencil buffer value.
  • Less Equal: Passes if the reference value is less than or equal to the stencil buffer value.
  • Greater: Passes if the reference value is greater than the stencil buffer value.
  • Not Equal: Passes if the reference value isn't equal to the stencil buffer value.
  • Greater Equal: Passes if the reference value is greater than or equal to the stencil buffer value.
  • Always: The stencil test always passes.
This property is available only when Stencil is enabled.
PassSets the operation to perform on the stencil buffer value when the stencil test passes. The options are:
  • Keep: Keeps the current contents of the stencil buffer.
  • Zero: Writes 0 into the stencil buffer.
  • Replace: Writes the reference value into the buffer.
  • Increment Saturate: Increments the current value in the buffer. If the value is 255 already, it stays at 255.
  • Decrement Saturate: Decrements the current value in the buffer. If the value is 0 already, it stays at 0.
  • Invert: Negates all the bits of the current value in the buffer.
  • Increment Wrap: Increments the current value in the buffer. If the value is 255 already, it becomes 0.
  • Decrement Wrap: Decrements the current value in the buffer. If the value is 0 already, it becomes 255.
This property is available only when Stencil is enabled.
FailSets the operation to perform on the stencil buffer value when the stencil test fails. The options are:
  • Keep: Keeps the current contents of the stencil buffer.
  • Zero: Writes 0 into the stencil buffer.
  • Replace: Writes the reference value into the buffer.
  • Increment Saturate: Increments the current value in the buffer. If the value is 255 already, it stays at 255.
  • Decrement Saturate: Decrements the current value in the buffer. If the value is 0 already, it stays at 0.
  • Invert: Negates all the bits of the current value in the buffer.
  • Increment Wrap: Increments the current value in the buffer. If the value is 255 already, it becomes 0.
  • Decrement Wrap: Decrements the current value in the buffer. If the value is 0 already, it becomes 255.
This property is available only when Stencil is enabled.
Z FailSets the operation to perform on the stencil buffer value when the stencil test passes but the depth test fails. The options are:
  • Keep: Keeps the current contents of the stencil buffer.
  • Zero: Writes 0 into the stencil buffer.
  • Replace: Writes the reference value into the buffer.
  • Increment Saturate: Increments the current value in the buffer. If the value is 255 already, it stays at 255.
  • Decrement Saturate: Decrements the current value in the buffer. If the value is 0 already, it stays at 0.
  • Invert: Negates all the bits of the current value in the buffer.
  • Increment Wrap: Increments the current value in the buffer. If the value is 255 already, it becomes 0.
  • Decrement Wrap: Decrements the current value in the buffer. If the value is 0 already, it becomes 255.
This property is available only when Stencil is enabled.
CameraOverrides camera matrices and uses perspective projection.
Field Of ViewDefines the field of view when rendering objects, measured in degrees along the vertical axis. Unity uses this value instead of the value specified on the camera.

This property is available only when Camera is enabled.
Position OffsetMoves objects by this offset from the original camera position.

This property is available only when Camera is enabled.
RestoreResets the camera matrices after executing the render passes in this renderer feature.

This property is available only when Camera is enabled.