Normals Mask Pass
📖 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
_OutlineNormalsTextureMask.
🐛 Troubleshooting
- Issue: Incorrect normals.
- Fix: Use Lit shader with proper normal mapping.
- Performance: Moderate.