π³ CosterGraphics.Systems.OutlineSystem
π Render Passes
πͺͺ Outline ObjectID Mask Pass
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 IDs.
- 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
_OutlineObjectIDTextureMaskproperty.
π« Troubleshooting
- Issue: IDs overlap.
- Fix: Ensure unique IDs per object.
- Performance: Scales with object count.