- Home /
Is there a way to Separate the light contribution from the shadow?
I need to have a surface that is light-mapped so I created some directional lightmaps and it works great. However I was wondering if there was a way to take out the contribution of lights to the shader but still be able to render shadows that the light projects from other surfaces onto it.
More specific: The static lights that emulate the lightmap will not affect the static baked geometry but they have to illuminate the player character and I need the shadow of the player to get projected onto the static baked objects.
Now I thought about making an unlit shader that was still able to receive shadows BUT here's the catch, I have an extra light, a flashlight that I need to light and cast shadows over the whole scene, this includes the static geometry so what I really need to know is if there is any way for the shader to either negate the light contribution of the static lights (maybe a subtraction somewhere in the shader?) but still render their shadows AND receive full influence of the flashlight (the one exception, maybe in a second pass?)
If such a complex shader isn't possible can somebody suggest a way to tackle this? Thanks.