Jump to content
  • Advertisement
Sign in to follow this  
Alundra

PBR precision issue using GBuffer RGBA16F

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

Advertisement

RGBA16_SNORM method works good : http://zupimages.net/up/15/47/ftzh.png

Normals are stored in rgb, the alpha is used for decal mask.

 

Octahedral encoding is a favorite of mine at the moment, and I found that dithering (adding noise) to the normals actually goes a long way to fighting against these banding artifacts.

Interesting ! Can be nice to test that too.

Edited by Alundra

Share this post


Link to post
Share on other sites

If you click MJP's link, and then the links on that page, you end up here: http://aras-p.info/texts/CompactNormalStorage.html#method03spherical
To go full cirlce, there's a link on that page pointing back to MJP's blog

I don't know how to read Hodgman, haven't you realized this yet. biggrin.png

 

 

 


Short answer is the transformation between Cartesian and spherical is slow (relative to other transforms)

But is it faster than a (IIRC) cube map lookup for crytek's BFN's?

 

 

 


and the quality isn't as good as other approaches either.

Why? I would think spherical using the same number of bits versus a competing method would be superior.

 

edit - also


8bit sRGB is fine for colours

What about HDR?

Edited by Infinisearch

Share this post


Link to post
Share on other sites

 

 

What about HDR?

You don't generally put HDR colours into a gbuffer.
11_11_10 / 10_10_10 fixed point in linear colour space is about equivalent to 8_8_8 in sRGB space, so IMHO it's not usable for HDR, unless you've got a very small range and are ok with banding artifacts. I've shipped one game where we used 10_10_10 fixed point with a pow2 gamma space to minimize banding, but it wasn't good sad.png
11_11_10 / 10_10_10 floating point is just barely enough to get HDR working, maybe (if your API/GPU supports it).  
16_16_16 fixed or floating point is good. Floating point wastes a bit on storing the sign, plus you have to deal with NaN's and infinities sad.png, but it gives you a range from 0 to ~60k with logarithmic precision distribution, which is actually good for HDR data (as your tone-mapper probably has logarithmic weighting). Fixed point means you get that extra bit and don't have to worry about inf/nan, and you get to choose your own maximum scale value (which is a pro and a con).

 

 

You can do 11/11/10 or 10/10/10/2 for less "important" things that need HDR like cube maps and water reflections, EG stuff that you can just hope banding won't be noticeable on anyway.

Share this post


Link to post
Share on other sites

You don't generally put HDR colours into a gbuffer.

Why not?

edit2- because I remember reading that in a 'true' HDR pipeline even the textures are in an HDR format.

 

 

edit - also why would spherical encoding have an uneven distribution, I'd think by definition they would be evenly distributed...?

Edited by Infinisearch

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!