[URP] Implement Native Output Decal Support in VFX Graph
Solution
Unity 2023.3.x - Unity 6.3.x
Published 24 days ago
In earlier versions of the Universal Render Pipeline, the VFX Graph lacked a native context for rendering decals. Developers were forced to synchronize Decal Projector components with particle positions, which caused significant performance degradation due to broken batching and complex C# scripting requirements for transform synchronization. This made large-scale decal effects virtually impossible to optimize within the URP or HDRP.
With the release of Unity 6, the VFX Graph provides a dedicated Output Decal context. This feature allows the system to write directly to the D-Buffer or render in the forward decal pass, ensuring that particles behave as decals on geometric surfaces.
- Open your
VFX Graphand create a new system or modify an existing one. - Remove standard mesh or quad outputs and add an Output Decal context.
- Create a new
Shader Graphand set the Material Type to Decal in the Graph Settings. - Assign this
Shader Graphto the Output Decal context within theVFX Graph. - Configure the Output Decal attributes, such as Size and Fade, to control how individual particles project onto world geometry.
Additional Tips
- Ensure the
Universal Render PipelineAsset has the Decal Renderer Feature added to itsRenderer List. - For optimal performance, utilize
D-Bufferrendering when targeting platforms that support it to minimize draw calls. - You can still use the Output Decal to control depth bias and prevent z-fighting on overlapping particle decals.
TL;DR
Native support for Output Decal in VFX Graph is now available in Unity 6, allowing for high-performance, batched decal rendering directly from the graph editor without Decal Projector overhead.
Related Posts Haven't quite found a solution to your problem? We think these posts might help you.
Content inspired by a Unity discussion post.