π³ CosterGraphics.Systems.OutlineSystem
π Render Passes
π¦ Outline Normals Mask Pass
Stores view space surface normals of each pixel.
π Description
Renders view-space normals of π³Outline3D objects into a color texture. Enables contour outlines based on surface orientation.
π§ How It Works
- Inputs: Outline3D objects.
- Process: Draws with a Lit shader (for proper normals), clears depth, and captures RGB normals.
- Outputs:
Texture2D_OutlineNormalsTextureMask(R8G8B8A8_UNorm). - Code Example:
// From OutlineNormalsMaskPass.RecordRenderGraph TextureDesc normalsDesc = resourceData.activeColorTexture.GetDescriptor(renderGraph); normalsDesc.colorFormat = GraphicsFormat.R8G8B8A8_UNorm; TextureHandle normalsMask = renderGraph.CreateTexture(normalsDesc); builder.SetRenderAttachment(normalsMask, 0, AccessFlags.Write);
π Requirements
- Materials:
outlineNormalsMaskMaterial(Lit Shader Graph). - URP Settings: Normals buffer enabled.
- Dependencies: None.
π·οΈ Tier Usage
- Available in: Basic, Advanced, Pro.
- Conditional: Runs if Composite Shader has Texture2D
_OutlineNormalsTextureMaskproperty.
π« Troubleshooting
- Issue: Incorrect normals.
- Fix: Use Lit shader with proper normal mapping.
- Performance: Moderate.