Can anyone give me any tips on how to make a Doppler light effect in UPBGE?

I would like to make a Doppler light effect like when you start to approach the speed of light (you see UV ahead of you and it gets increasingly bright, the reverse happens behind you). Is there maybe a way to code this into a 2D Filter? I am asking for some tips on how to code this, as the Doppler effect on light is quite fascinating, and would be extremely cool to replicate.

That one is interesting…technically, you would need to know the range rate of the object per Pixel first, means if it’s moving towards or away from the camera. This should also work for an object which turns around in front of you, so you’d have it shown two colored.

I am quite sure that this would have been possible by assigning custom shader, either an Material to an object or a 2D filter…

The closest thing I recall right now are some old exampes for (per object) motion blur which were floating around here in the forum years ago.

Maybe some of the GLSL wizards around here can help? Otherwise a look at shadertoy.com might also give some good inspiration

On M1 macs, assigning shaders to materials in game does not work, as mapping them to verts will cause it to be unloaded simply because Apple screwed up M1 with shader compiling and thus, binding shader textures to an int or float does nothing. (Unsupported (log once)) issue. The only way to work around this will be to create an array and do it from there, which I dont know how.

2D filters are unaffected as they comprise only of the fragment shader.

Can anyone maybe help me as to how I can make an array for a vertex shader on UPBGE to map textures without triggering the unsupported issue?