Table of Contents

πŸ”³ CosterGraphics.Systems.OutlineSystem


πŸ’ Render Passes


⬛ Outline Depth Mask Pass


Scene Depth Texture Mask of the Outline3D geometry, generated by the OutlineDepthMaskPass.
Stores the depth/distance away from the camera of each individual pixel.

πŸ“– Description

Captures the depth values of πŸ”³Outline3D objects into a depth texture. Used for contour outlines and depth-based edge detection in Composite Shaders.

πŸ”§ How It Works

  • Inputs: Outline3D objects.
  • Process: Draws objects to a depth-only render target with raw depth values.
  • Outputs: Texture2D_OutlineDepthTextureMask (D32_SFloat_S8_UInt).
  • Code Example:
    // From OutlineDepthMaskPass.RecordRenderGraph
    TextureDesc depthDesc = resourceData.cameraDepthTexture.GetDescriptor(renderGraph);
    depthDesc.format = GraphicsFormat.D32_SFloat_S8_UInt;
    TextureHandle depthMask = renderGraph.CreateTexture(depthDesc);
    builder.SetRenderAttachmentDepth(depthMask, AccessFlags.Write);
    

πŸ”— Requirements

  • Materials: outlineDepthMaskMaterial.
  • URP Settings: Depth buffer enabled.
  • Dependencies: None specific.

⭐ Tier Usage

  • Available in: Basic, Advanced, Pro.
  • Conditional: Runs if Composite Shader has Texture2D _OutlineDepthTextureMask property.

πŸ”« Troubleshooting

  • Issue: Incorrect depth.
    • Fix: Ensure ZWrite On in material.
  • Performance: Low cost.

See Render Passes Overview.