Jump to content
  • Advertisement
Sign in to follow this  
tandlar

Is there a default preferred DXGI_FORMAT

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

Wondering when creating a device if there is a particular format that is considered the default when specifying a DXGI_SWAP_CHAIN_DESC?

 

Just fooling around with some initialization code and there seem to be a lot of formats, and not sure with respect to gaming if there is a particular default such as DXGI_FORMAT_R8G8B8A8_UNORM?  I realize that it might depend on some of the other things that you are doing, but just in general.

Thanks

Share this post


Link to post
Share on other sites
Advertisement

Supposedly you wanna use DXGI_FORMAT_R8G8B8A8_UNORM_SRGB as backbuffer format as it will gamma correct your backbuffer before sending it to the monitor.

 

You also wanna load textures into this format unless your loader function does that for you. You see, texture files are brighter then you see them on screen, that is because the monitor darkens images, so to correct for this darkening all textures are brightened up to compensate.

 

When fiddling with lighting and sampling in shaders you want your textures and backbuffer in this format such that you don't have to worry about reading brightened pixels, the format fixes this for you behind the scenes.

Share this post


Link to post
Share on other sites

If you haven’t converted your pipeline to linear space, DXGI_FORMAT_R8G8B8A8_UNORM is the typical default.  DXGI_FORMAT_R8G8B8A8_UNORM_SRGB will come later.

 

 

L. Spiro

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!