Jump to content
  • Advertisement
Sign in to follow this  
ops2

fp16+AA error in DirectX 9 (nvidia G92 card)

This topic is 2994 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

I render my scene to a fp16 rendertarget(created with MSAA) with MSAA(4x) enabled. and then StretchRect to a fp16 texture. and I prepare to use it to do a tonemapping.
But some wrong pixels(<10) appear in the texture.. they are very big values(luminance>100 at least).
they appear rarely in some areas in my scene. sometimes they look like on the edges of polygons.
I change my card from geforce 9600GT to 8600GT. wrong pixels still exist.

If I disable MSAA and use rt texture directly. there's nothing wrong.

so what's the problem?
or what's the proper way to do antialiasing with float-point target in geforce8 or above in DX9? (I know that geforce6 and 7 series are not supported)

[Edited by - ops2 on July 13, 2010 12:05:41 PM]

Share this post


Link to post
Share on other sites
Advertisement
Have you tried using a fp32 render target? It could be a precision error though I haven't used fp16 or had a similar error myself.

Is there any reason why you're using fp16?

Share this post


Link to post
Share on other sites
re Darg :
I tried fp32. wrong pixels still exist.
I use fp16 to implement HDR effect.

re Yann L :
How to do a centroid sampling?

ps.
I found there are also some wrong black pixels.
my scene is rendering with different pixel shaders (ps 2.0). there are terrain, models and some other objects . and I display the fp16 texture to screen with ps 3.0. (backbuffer is A8R8G8B8)
When I turned off pixel shader of terrain . It seems that the wrong pixels on terrain disappeared.

Share this post


Link to post
Share on other sites
Quote:
Original post by ops2
I found there are also some wrong black pixels.
my scene is rendering with different pixel shaders (ps 2.0). there are terrain, models and some other objects . and I display the fp16 texture to screen with ps 3.0. (backbuffer is A8R8G8B8)
When I turned off pixel shader of terrain . It seems that the wrong pixels on terrain disappeared.

As I said, these artifacts come from the fact that you don't use centroid sampling. It's a common beginner mistake.

Quote:
Original post by ops2
re Yann L :
How to do a centroid sampling?

Did you even try to type "centroid sampling" into Google ? This is the first result on a long list of results explaining what this is and how to use it...

Share this post


Link to post
Share on other sites
re Yann L :
I'll try that, Thanks very much!
But why it occurred only when I use float-point target?

Share this post


Link to post
Share on other sites
The problem occurs in non FP targets too. They're just less noticeable as they can't reach insanely out of range values, and are partially hidden by the averaging filter when resolving the AA target. With an FP texture, a single out of range subsample will mess up the entire resolved screen sample.

Oh and btw, you do know that floating point HDR rendering and MSAA don't work correctly in linear space, do you ? Just trying to prepare you for the next annoying surprise ;)

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!