I want to edit the Standard shader provided by Unity in order to change the alpha value of a fragment (pixel) according to given parameters I pass to the shader.
For now, thanks to this link, I have been able to :
- Retrieve the standard shader,
- Retrieve a custom
Core.cgincI included in the
DEFERREDpass of the custom shader,
- Create a custom Editor script to handle the Shader and my custom parameters,
Fadeas the rendering mode of the shader to handle transparency, using the custom editor script,
- Create a custom file replacing
UnityStandardInput.cgincand changed the references in the
But now, I can't seem to figure where to change the alpha value of the fragment. I've tried a ton of possibilities in the
Core.cginc file. Changing the color and the map of the Albedo works, but I can't find where the final alpha value is set.
I've browsed the files in the
CGIncludes folder in the builtin shaders of Unity.
UnityStandardCore.cginc: Already tried many possibilities (including the returned value of
Alphafunction, no effect
Since the files are huge, I don't feel it will be useful to copy-paste them here.
Thanks for your help in advance.