Hello!
TLDR: Wanted to use the Standard shader to render decals on a car. Added the decal texture into the Detail Albedo of the material with a Standard shader. Results are perfect apart from the blend mode of the texture. I wanted to overlay the texture over the main Texture of the material, instead it’s rendering like “Multiply” (tinting the main texture).
Goal: have a lit shader similar to the Standard one with a dedicated slot for a decal that will be rendered on top of the main texture and the whole surface should be lit/metallic.
Expanding on TLDR, what I tried so far:
-
Tried Legacy Shaders/Decal. Result is perfect in terms of blending mode (the decal texture is overlaid on top of the main texture, the main texture is not visible under the decal). But it is not lit. Having this Decal shader with some lit/metallic properties would also be a perfectly valid solution.
-
Downloaded the builtin-shaders archive. Discovered that the Standard shader contains the line:
#pragma shader_feature_local _DETAIL_MULX2
In UnityStandardInput.cginc that was included into the builtin-shaders archive, discovered that there are other defines _DETAIL_MUL, _DETAIL_ADD, _DETAIL_LERP.
Created a copy of the Standard shader, tried replacing all of the _DETAIL_MULX2 mentions in the file with all of the other define versions (_DETAIL_MUL, _DETAIL_ADD, _DETAIL_LERP). With each of these other ones the decal texture disappears completely from the model. With _DETAIL_MULX2 it renders fine, but, of course, again, with a multiply effect.
Thanks for reading till this point. If you can point me in the right direction with this or if you happen to have a similar shader, please help me out.