π³ CosterGraphics.Systems.OutlineSystem
π Render Passes
β¬ Outline Depth Mask Pass
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
_OutlineDepthTextureMaskproperty.
π« Troubleshooting
- Issue: Incorrect depth.
- Fix: Ensure ZWrite On in material.
- Performance: Low cost.