Advertisement

FXAA and normals/depth

Started by October 29, 2017 07:45 PM
4 comments, last by Hodgman 7 years, 3 months ago

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)?

🧙

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?

Advertisement
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.

🧙

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.

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

This topic is closed to new replies.

Advertisement