Jump to content

  • Log In with Google      Sign In   
  • Create Account


How to avoid "shader ghosting" artifacts


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Meltac   Members   -  Reputation: 335

Like
0Likes
Like

Posted 06 May 2012 - 01:16 PM

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

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?

Sponsor:

#2 belfegor   Crossbones+   -  Reputation: 2517

Like
1Likes
Like

Posted 06 May 2012 - 02:45 PM

Looks like RT is not cleared.

#3 InvalidPointer   Members   -  Reputation: 1404

Like
0Likes
Like

Posted 07 May 2012 - 10:04 AM

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.

#4 Meltac   Members   -  Reputation: 335

Like
0Likes
Like

Posted 09 May 2012 - 02:05 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS