- Home /
How do I keep an object lit when a light moves past it?
I have a scene consisting of various objects and a single light that moves through the scene. When an object gets lit by the light, I want it to stay lit (from the same angle, distance, etc) even when the light moves away, essentially giving the light an infinite trail.
What would be the best approach towards something like this? I'm thinking that the shader should somehow sample the lit color for each pixel and remember the brightest value the pixel gets. If the color sampled from the realtime lighting is lower than the stored value, the stored value is returned, if the color sampled from the realtime lighting is brighter, that value is stored as the new brightest value and returned. However, I'm not sure how to go about this.
Any ideas?
Comment