Jump to content
  • Advertisement
Sign in to follow this  
matt77hias

FXAA and normals/depth

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

If one applies FXAA on the pixel colors, is there some AA one can apply as well on the normals and depths (which will all be used as input in further post-processing)?

Share this post


Link to post
Share on other sites
Advertisement
1 hour ago, matt77hias said:

If one applies FXAA on the pixel colors, is there some AA one can apply as well on the normals and depths (which will all be used as input in further post-processing)?

Depth AA? What would this even be?

Share this post


Link to post
Share on other sites
2 minutes ago, FreneticPonE said:

Depth AA? What would this even be?

I just wonder if you "blur" (e.g. edges in FXAA) the pixel colors shouldn't you kind of "blur" the normals as well? Similar for the depth.

Edited by matt77hias

Share this post


Link to post
Share on other sites

Not exactly as such. For FXAA you're only blurring final colors. Basic idea is that it hides jaggies at the cost of being a bit blurry.

For normals you do want AA, you want normals and roughness to correlate, so the normal map blends into your roughness. This will help prevent "sparklies" or bright shiny pixels you get from using HDR and reflective PBR materials. I know that's not the best explanation, but the full explanation is here. Code, demo, etc. etc.

Edited by FreneticPonE

Share this post


Link to post
Share on other sites

You can blur normals, but you want to make sure you don't blur them between different objects, or everything will end up with very strange lighting on the silhouettes. This is a pretty uncommon thing to do, however Epic/Unreal did do it in one of their recent tech demos IIRC. A more standard approach is to make sure that your normal maps are mip-mapped, and were created with care (a nice filter and renormalization). To take that further, look into Toksvig normal mipmapping... and to take it to the extreme look into LEAN/CLEAN maps.

Blurring depth values is nonsense though. Say you've got three lights - red in the foreground, green in the mid-ground, and blue in the background. Say you've got two objects, a player in the foreground and a mountain in the background. The player should be lit red and the mountain should be lit blue. If you blur your depth values, the pixels of both player and mountain that are near the player's silhouette will be lit green :o

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!