Sign in to follow this  
tandlar

Is there a default preferred DXGI_FORMAT

Recommended Posts

tandlar    130

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
Tispe    1468

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this