DeferredDecals icon indicating copy to clipboard operation
DeferredDecals copied to clipboard

Improved version of unity's deferred decals system with layering and frustum culing

UnityDeferredDecals

Improved version of unity's deferred decals system with support of layers and some basic frustum culling.

How to use:

  1. Essential files are stored in Assets/DeferredDecals. You can copy paste this folder to your project and everything should work fine
  2. Add DeferredDecalRenderer.cs to your scene. There should be only one renderer
  3. Use GameObject/Effects/Deferred Decal to create decal
  4. Use GDecalShader shader for your decal material
  5. You're amazing :D

Pros:

  • Improved inspector with embedded material editing:
  • Layers. Though making layers is pretty expensive since the more layers you have on screen the more passes are needed.

  • Cutout. Each decal can use Alpha Clip to avoid using layers
  • Blending with background normals
  • Decals can influence smoothness and specular color, using Metallic workflow
  • They are still rendered if you're inside the render box

Cons:

  • No special normals/diffuse only decals, so each decal layer does copy 3 GBuffers no matter what
  • Visibility in editor can be clunky
  • Shader is under development. No emission support yet
  • No instancing
  • Culling doesn't care about walls, it's just AABB check. For now