UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

graphics

[URP] Implement Native Output Decal Support in VFX Graph

Solution

vfx graphurprenderingshader graph

Unity 2023.3.x - Unity 6.3.x

Published 24 days ago

Issue

 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.

Explanation

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.

  1. Open your VFX Graph and create a new system or modify an existing one.
  2. Remove standard mesh or quad outputs and add an Output Decal context.
  3. Create a new Shader Graph and set the Material Type to Decal in the Graph Settings.
  4. Assign this Shader Graph to the Output Decal context within the VFX Graph.
  5. 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 Pipeline Asset has the Decal Renderer Feature added to its Renderer List.
  • For optimal performance, utilize D-Buffer rendering 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.