There’s two decals in the scene because one uses the stock URP Decal shader graph, and the other is just a straight copy-and-paste of the URP Decal shader graph into my /Assets/ folder. Clearly, it doesn’t really make a difference which shader graph source is used.
Is the Decal shader getting erroneously stripped? Here’s my Graphics project panel:
I have ‘Strip All’ variants set, but that shouldn’t mean the Decal shader graph gets missed.
In an effort to try and ‘force’ the Decal shaders to get built, I added it to a Shader Varient asset you can see preloaded above, where the shader graphs are clearly listed:
Something’s very wrong here. I’m going to file a bug and update this thread with the issue number when I have it.
I got a helpful reply back from Edvinas on the Unity QA team. It turns out that if you have GPU instancing set on the Decal material, the Decal shader is entirely stripped when you have ‘Strip All’ set in the Instancing Variants player settings, which is not behaviour I’ve come across for any other URP shader.
The docs for the Decal renderer say:
The docs should probably also mention in the same section that ‘Strip All’ + Enable GPU Instancing aren’t supported.
Little rant:
Unity seems to introduce more and more features and most of them feel unfinished. So many open ends, missing functionality and bugs. It’s extremely cumbersome to work with for bigger projects, especially since upgrading to another version might fix some problems, but will also introduce a whole bunch of new problems, sometimes even breaking stuff that worked before. I might switch to Unreal for my next project after 8 years of Unity development.
I feel ya. When I dropped in decals to our recent project, the first thing I noticed is there was no way to limit what they go on. Such a basic feature! I ended up adding it in myself haha.
I think all these recent screwups are being reflected in their stock price. Hopefully someone over there realizes they’re focusing on the wrong things and pivot. They need a GAME engine, not a screenshot engine. If GAMES are not being released on unity’s tech, then what is the point of making all this new stuff?
They need to ensure people can make games with the tools they use. They need to ensure things are stable. They need things to be reliable. Unity just needs to make games, honestly.
ironic, cuz in 2021.1 i managed to fix it myself, but mostly by accident.
Taking that they know the problem is just the variant being stripped, then it’s just a matter of disabling “Strip All”, and manage them manually
and carefully i guessTo clarify, the previous bug with decals was that it ignored the scaling of the screen, making the “Screen Resolution” feature unusable.
This is indeed a NEW bug, stripping works as intended.
The problem is that older devices just do not render decals.
Which is wierd, as screenspace should be the more performant option.
My old phone is a HuAwei p9.
No one is gonna play on it realistically speaking … but it was. good flex to make it run at +40 fps while updating the entire screen with meshes
too bad … potato mode it is for them, so at least I can gain even more performance by disabling the depht pass and decas completely … those are half a millisecond combined, so the savings are pretty huge!
Im on 2021.3.20 and compiled different methods of fixing this issue from different forums and built in WebGL 7 seperate times, and nothing seems to work. This is upsetting because my environment relies on URP Decals for it’s narrative (my game is inside a cave and i used decals to make some cave paintings that told a story). I have to be limited on my local build and put my project in my portfolio by screen-recording my playthrough, while it could have been accessible for everyone to play if it weren’t for this bug.
If anyone has any last-resort suggestions don’t hesitate
Check if you are using the same Quality settings, in URP, there might be build settings for different platforms, and you chose support in one setting, but did not in another. Also in DX11 it works fine when stripping is removed. So it is shader stripping problem.
I found the issue and posted more info here, but the short of it is, in the render feature “Technique” is set to auto, in build it must be defaulting to “screenspace” when “dbuffer” is whats used in editor.