World light direction fallback
Posted: Mon Apr 08, 2019 2:15 am
Hello! I am working on a toon shader that needs to work in both realtime and baked lighting situations. I am using a shading ramp texture and would like to have it fall back to a fake light direction of [0,1,0] when there is no directional light present. How would I test for this? I have tried using an If node testing for a vector of [0,0,0] from the World Light Direction node but have not had any success. I should also note that I have "safe normalize" turned off in the World Light Direction node. Maybe I am thinking about this wrong, but so far I have not been able to achieve what I am looking for. Any help would be greatly appreciated!