Your 0 to 5 Volts goes to a pair of OP amp circuits with the same gain: one inverting and the other non-inverting.
The common gain factor is selected to power a pair of LEDs. One LED is bright when the other is dim and vice-versa. They cross fade.
Each LED shines on a photoresistor with external light excluded (heat shrink, tube and some chalk, etc.). Of course, the light from the other LED should also be excluded.
https://www.mouser.com/c/?q=photoresistorThe photoresistors are used as two input resistors of a third OP amp with an adder circuit configuration.
A is input through one photoresistor.
B is input through the other photoresistor.
The output of that third OP amp is a signal that fades back and forth from A to B and B to A.
I am sure this will work beyond DC. But I have no idea of what bandwidth can be possible. Audio? Probably. Base band, analog video? Perhaps, perhaps not. Linearity? Perhaps a challenge.
Have fun experimenting.