Light Direction Vector Accessible in Shader Nodes
Blender used to have a 'Lamp Data Node' that provided information about the light that was being evaluated at a particular shading event. This included a vector for the incoming light direction towards whatever light was being sampled. This is a very useful piece of information to have and making it accessible would open up a new range of shader possibilities.
From my experience in computer graphics, I think it would be fairly trivial to expose this vector from Cycles, but perhaps not so much in Eevee (because of how area lights work?).
Nonetheless, I think it would be great to have access to light info in shaders again and would like to see if this can be implemented. :)
1 Comment
gee, 4 years already. i was recently trying Arc System's anime shading, i need to do a dot product of object surface normal and incoming light source direction to tell if they are smaller than 90 deg. now blender offers surface normal, but i just can't find "light normal" consider game engine should offer such information why blender still have not? maybe becasue of ray-tracing is different than usual rasterization or something...? i mean at least we have eevee for that.