Closed grenappels closed 1 year ago
I found a hacky workaround for now: it seems like the 0 for metallic and the 1 for occlusion were the const values that were trying to be modified. if i just make a throwaway var (since they are not used anyway) and feed it to the ApplyDecal function, it works fine.
float throwaway = 0.0;
#ifdef _DBUFFER
ApplyDecal(unpacked.positionCS,
surfaceDescription.BaseColor,
specular,
inputData.normalWS,
/*metallic,*/
throwaway,
/*surfaceDescription.Occlusion,*/
throwaway,
surfaceDescription.Smoothness);
#endif
Looks like applydecal is marked as inout. https://github.com/Unity-Technologies/Graphics/blob/632f80e011f18ea537ee6e2f0be3ff4f4dea6a11/Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl#L120
If you want to make a pull request with your throwaway variable, I'll merge it through.
Hello, love that this exists, it's wonderful so thank you. I'm encountering an issue where if I enable decal renderer feature, my shader stops compiling with this error:
the code at line 112 is
I will try upgrading to a newer version of unity since I'm not in production or anything, but I might be stuck on the current version and just wanted to flag that this specific thing was broken for me.