Table of Contents

πŸ”³ CosterGraphics.Systems.OutlineSystem


πŸ’ Render Passes


🟦 Outline Normals Mask Pass


View Space Normals Texture Mask of the Outline3D geometry, generated by the OutlineNormalsMaskPass.
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 _OutlineNormalsTextureMask property.

πŸ”« Troubleshooting

  • Issue: Incorrect normals.
    • Fix: Use Lit shader with proper normal mapping.
  • Performance: Moderate.

See Render Passes Overview.