Decals Don't Work In Build

Thanks for this.

To clarify, in build the Auto setting needs to default to using Screenspace for platforms that don’t support it (like OpenGL), but it’s not. Was wondering why I was getting an error from the decal feature of the render pipeline on every Update cycle, even when my scene had zero decals.

It would also be great if Unity could seriously add some “only report this error once” de-spamming in their code now and then, but maybe they laid off that engineer.

Try these to fix this problem:
First, set the Quality in the Project Setting to “Ultra”.
Then, change the BatchRendererGroup Varients in the Project Setting To “Strip All”.
And set the settings:



I hope to work for you.

Disabling “Strip Unused Variants” worked for me, with the downside of compiling taking a million years.

I just need Unity to include the DBUFFER variants, is there another way? Do I need to hack the URP?

1 Like

You just need to change the render feature from automatic.

I should have mentioned it in my post, but unfortunately, that method didn’t work for me - I already set it set it to DBuffer:
9646739--1372145--upload_2024-2-16_0-26-31.png

I’m on Unity 2022.3.7f if it makes a difference.

Using a custom decal shader?

Changelog | Universal RP | 14.0.10 (unity3d.com)

In additional news this issue appears to be fixed in the latest URP14.

1 Like

I am actually! Does this make a difference?

I believe the shader dictates compatibility with either or mode, but I dunno how it works for sure.

Are you using shader graph?

I am using shader graph. Using the frame debugger I can see that the decals are being rendered to the DBUFFER in the build, but the regular lit shaders don’t get the DBUFFER keyword so the decals are never applied.

Not sure what’s going on there, I would maybe try isolating the setup to as basic as possible.

I still need to try updating my URP version (I’m on 14.0.8) but I found that commenting out
StripUnusedFeatures_DecalsDbuffer in ShaderScriptableStripper.cs in the URP fixed the issue. As far as I can tell ShaderBuildPreprocessor.cs properly detected ShaderFeatures.DBufferMRT3 so I don’t know why it’s still stripping it, but I’ll look into this more later.

same here, 70-80% of my android users support vulkan, so it’s a no go to use the decal solution. It’s not documented, though that makes it stranger, it might be a bug, but layered decals aren’t working for OPENGL. I tried with a clean new project to test it, and I can confirm it. It might happen to people to develop with vulkan enabled in the editor, and then find out that opengl only android users see the decals projected to every layer. I don’t have time to report it. The issue was found with URP 14.0.11 and unity 2022.3.45f1

It’s actually documented here.

Besides the rendering layers (also called decal layers or light layers), URP also doesn’t support Deferred rendering path on OpenGL, and probably no one knows why.

Then it should also be mentioned in the decal documentation and prompt proper messages.

1 Like