Table of Contents

πŸ”³ CosterGraphics.Systems.OutlineSystem


πŸ’ Render Passes


🧱 Outline Color Mask Depth Tested Pass


a Binary White on Black Color Texture Mask, Depth Tested against other non-outline geometry, rendered by the
OutlineColorMaskDepthTestedPass pass.
(for taking this Screen Shot the Outline3D components on the turret and the bunny were disabled)

πŸ“– Description

Renders silhouettes of πŸ”³Outline3D objects with depth testing, ensuring outlines only appear where objects are visible (not occluded by other geometry). This creates more accurate masks for complex scenes.

πŸ”§ How It Works

  • Inputs: Outline3D objects and camera depth buffer.
  • Process: Draws objects with LEqual depth testing and depth bias. Uses a separate channel (e.g., G) in the color mask texture.
  • Outputs: Updates Texture2D_OutlineColorTextureMask (G channel).
  • Code Example:
    // From OutlineDepthTestedColorMaskPass.RecordRenderGraph
    builder.SetRenderAttachmentDepth(resourceData.cameraDepthTexture, AccessFlags.Read);
    // Draw with depth-tested material
    

πŸ”— Requirements

  • Materials: outlineColorMaskDepthTestedMaterial.
  • URP Settings: Depth buffer enabled.
  • Dependencies: Requires Color Mask Pass.

⭐ Tier Usage

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

πŸ”« Troubleshooting

  • Issue: Outlines appear behind objects.
    • Fix: Adjust depth bias or test mode.
  • Performance: More expensive than basic color mask.

See Render Passes Overview.