π³ CosterGraphics.Systems.OutlineSystem
π Render Passes
π§± Outline Color Mask Depth Tested Pass
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
_OutlineColorTextureMaskDepthTestedproperty.
π« Troubleshooting
- Issue: Outlines appear behind objects.
- Fix: Adjust depth bias or test mode.
- Performance: More expensive than basic color mask.