I’ve adapted this fresnel rimlight shader I found a while ago in this forum.
For my use case it would look better if the rimlight was independent from the view angle, i. e. at a fixed angle and sharp falloff, no matter where the object is located on the screen. The correct implementation gets too extreme at some angles, it washes out the colors of my objects, and it looks as if the light is coming from the center of the screen, when I actually want it to come from an large distance far behind the scene. It should always look like it does on the left sphere, never like the one on the right side.
I’ve tried to change the calculation to achieve this. For example, I made the vEye
vector a constant, besides many other ideas (mostly guesswork tbh). To my shame, I failed miserably at making it work. So I’m hoping one of you wizards can help me out here with the math!