- Home /
Modify Color in Surface Shader After Lighting (Forward Rendering)
Hi everybody.
I'm looking for an easy-to-implement way to modify a surface-shader's final color after lighting. When using Deferred lighting, finalcolor:myCustomFunction does the trick. However, we're depending on Forward-Rendering-Path in our project, so I'm looking for a way to achieve the same thing there.
Anybody got any ideas? Thanks in advance :)
Never used it myself (thus a comment, not an answer), but check out the Final Color $$anonymous$$odifier section of this page:https://docs.unity3d.com/$$anonymous$$anual/SL-SurfaceShaderExamples.html From the description it sound like what you are looking for. It allows you to specify a function that takes the color the surface shader was going to output, and modify it. It also takes the other components of the surface shader (Input, SurfaceOutput) as parameters, in case you need that info to compute the new color.
Hey Glurth,
thanks for the comment! Unfortunately, that's the solution I already tried and to my understanding, when using Forward Rendering Path, the lighting is applied after the Final Color $$anonymous$$odifier (since the lighting happens in seperate passes after the one that finalColor was applied to).
Thanks anyways! :)
Your answer
Follow this Question
Related Questions
Surface Shader World Normal 0 Answers
How can I make the most efficient SDF Shader in unity 1 Answer
Why my particle system is rendering behind a standard shader? 0 Answers
Oculus rendeing bug 0 Answers