- Home /
Control light intensity via shader script
Hi, folks! I have various objects in scene that uses the directional light as their light source. The problem is the light intensity is set too high. Some objects' color in the scene is too intense that the texture gets saturated. Instead of having multiple directional light with their respective culling mask I wanted to create a shader that can adjust the object's light intesity. Here's my goals and restrictions:
Create a slider to control intensity.
The shadow must not be affected by the shader
The shader must reference the main directional light
Shader must be specular (BlinnPhong)
Surface shader preferred (vertex and fragment scripting is still a challenge for me)
This project is for mobile, so optimization is critical. Any help and direction would be appreciated. I am new to shader scripting so please excuse my ignorance.
Thanks in advance!
Your answer
Follow this Question
Related Questions
How to fix this point light bug in surface shader? 1 Answer
How to write unlit surface shader? 6 Answers
Shading is visible through object using surface shader 0 Answers
Spherical Hamonics - ShadeSH9 and Surface Shader issue 0 Answers
Shaders - How to have multiple objects show different textures when it has some light. 0 Answers