https://1drv.ms/u/s!Aup_NDH7UAIvg6cB6EMyyUdUHqpkOQ?e=DtL5cM://
The little project in the link above has a shader on a sprite that copies a sampler2D texture over the sprite, but offset by 1 pixel to the left, it also draws a blue area on the right of the screen. The main GDScript code grabs the texture from the viewport that the sprite is on each frame and sends this back to the shader as the sampler2D.
The effect should be that the blue area on the right gets dragged across the viewport. What actually happens is that the blue gets copied a bit darker each time (this seems to accelerate exponentially as it gets darker) until it is black.
If the blue colour is full blue (.b = 1.0) then all works fine, but smaller numbers (eg 0.99) cause it to get darker when copied.
I have tried changing the type hints on the sampler2D and the flags on the images in the GDScript, none has any effect.
I did think it might be a rounding issue from the difference between floats and 8 bit colour values, but the exponential nature would seem to deny this.
Any idea why this happens? Can it be fixed?