Table of Contents

🔳 CosterGraphics.Systems.OutlineSystem


🏒 Render Passes


🪪 Outline ObjectID Mask Pass


ObjectID Texture Mask of the Outline3D geometry, generated by the OutlineObjectIDMaskPass.
Stores the ObjectIDs of each Outline3D component which can be used for per-object outline colors and per-object outline intersections.

📖 Description

Reads ObjectIDs from 🔳Outline3D objects and renders them into a texture. Enables per-object outline customization (e.g., different colors per object/team).

🔧 How It Works

  • Inputs: 🔳Outline3D objects with 🪪ObjectIDs.
  • Process: Draws objects with MPBs setting _ObjectID, using depth testing.
  • Outputs: Texture2D_OutlineObjectIDTextureMask (R16G16_UNorm).
  • Code Example:
    // From OutlineObjectIDMaskPass
    MaterialPropertyBlock mpb = new();
    mpb.SetFloat(ObjectIDPropertyID, objectID);
    cmd.DrawMesh(mesh, matrix, mat, subMeshIndex, 0, mpb);
    

📋 Requirements

  • Materials: outlineObjectIDMaskMaterial.
  • URP Settings: None.
  • Dependencies: Depth Mask for testing.

🏷️ Tier Usage

  • Available in: Advanced, Pro.
  • Conditional: Runs if Composite Shader has Texture2D _OutlineObjectIDTextureMask property.

🔫 Troubleshooting

  • Issue: IDs overlap.
    • Fix: Ensure unique IDs per object.
  • Performance: Scales with object count.

See Render Passes Overview.