Jump to content
  • Advertisement
Sign in to follow this  
Davidtse

Best place to store roughness and other 1 channel maps?

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

Like the title says i'm curious about what's the most efficient place to store these one channel maps? Right now i'm rewriting my texture pipeline and I don't know if I should pack the roughness in the alpha channel of the diffuse and compress it with BC3 or just put the roughness into its own texture compressed with BC4 then do the diffuse with BC1. I don't have a super deep understanding of exactly how GPUs work yet so i'm not sure which one would end up being better, so If someone with some more insight could weigh in I would appreciate it.

 

Thanks, 

David 

Share this post


Link to post
Share on other sites
Advertisement

A BC3 texture is basically exactly the same as a BC1 and BC4 texture interleaved together :)

 

So in your example, you're basically asking whether structure of arrays (one array of diffuse values, and one array of roughness values), or array of structures (one array of diffuse/roughness pairs) :)

There's not much of a muchness... but each individual texture fetch takes some work per pixel - so packing two textures together (as long as they use the same UV coordinates) saves some work. Also, when the memory access patterns are the same (i.e. the UV coordinates are the same), then array of structures will likely cache better than structure of arrays will.

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!