Shader Mixing: Get Color of Light Source From Surface?

DefenistratDefenistrat Posts: 68

I'm trying to tweak the Visual Style Shaders in such a way that I don't have to manually set the tint from light and shadows on every surface in order to change the tone of a scene. If you're not familiar with Visual Style Shaders, you have to select the diffuse color (diffues light), the shadow color (diffuse dark), and the ambient colors for both shaded and lighted parts of the surface. The more complex your scene, the more of a pain it is to set it up.

What I want to try to do is keep a lot of the attributes of the Visual Style Shaders, but instead of having to set all of these colors, I want to just set a base color of each surface, and then using the color of the light for the scene, mix the diffuse light with the color of the light, the diffuse dark with the color of the light's shadow, and the occlusion color with the color of the environment. This way, if I want to make the scene more warm, I can just change the light to a warmer color and it affects the whole scene, rather than having to go into each surface, calculate the color difference that I am trying to achieve and adjust 5 colors (there's specular, too) on every surface...

Digging further into the the Shader Mixer and Shader Builder... it seems that getting the color of the light that is hitting the surface is not possible, but I thought I would throw this out there anyway, would at least like confirmation.

Post edited by Defenistrat on

Comments

  • For what it's worth, I wound up using PWToon Shaders instead. They blend the color you provide them with the color of the light, and you can just select all services and select a shadow color to provide a consistant looking shadow.

Sign In or Register to comment.