To simulate the doppler effect of light, I’ve written a script that changes the _BaseColor
of every object the script is attached to (which all use the Universal Render Pipeline shader) based on the player’s closing speed to whichever object.
This works wonderfully between objects:
(The effect is highly exaggerated)
I, however, also want the effect to apply within the surface of the object. So, if the observer were to be moving “normal” (?) to an object (like the video), you’d see multiple colors - like a gradient between red-shifted and blue-shifted - on only one object. This will be because the part of the object in front of the observer’s path is moving towards the observer, while the part behind the observer’s path is moving away from the observer.
Does anyone have any idea how I can do this?
Eventually I’ll be back here asking how to achieve Terrell Rotation lol.