How do I link light intensity to a variable equation that affects multiple lights individually? (In VR with HTC Vive)
For my game I am simulating glare, and have an equation for calculating the amount of luminance on the observer's eye. Since glare is perspective-based, the equation needs to factor in that the angle the sun hitting the user's eye (in this case, the camera rig) will be changing as the user moves their head around. This in turn needs to change the intensity at each point I have a light, for each separate light.
Does anyone have any strategies for going about coding this? I am assuming I need to call each light individually as a function, and then have the intensity be linked to the glare equation which stores the angle of light source incidence as a variable, linked to the headset.
Any insight or help offered is much appreciated!
Comment