I'm experiencing issues with my pixel shader. As soon as I apply any color change to ONLY SOME BUT NOT ALL pixels (e.g. only to specified materials) I'm getting weird artifacts in the sky (I heard some call that "shader ghosting"):
This happens only in the projected sky cube texture and only unless all pixels are processed equally with the same amount of color change.
Any ideas why this happens and what could be done to avoid it?
Belfegor's bang on the money. If you write to a pixel, everything's good as the old stuff is overwritten. If you don't, you keep whatever was there.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.
Thanks. It turned out that I can avoid the ghosting by restricting my shader processing to pixels with alpha equals 1 (Color.a). Since sky seems to have lower alpha channel in my game, it will not be processed at all thus preventing it to draw those awful artifacts.