Jump to content
  • Advertisement
Sign in to follow this  
Meltac

How to avoid "shader ghosting" artifacts

This topic is 2388 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys

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"):

[sharedmedia=gallery:images:2177]

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?

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!