Reputation: 519
Currently implementing a D3D11 renderer, and the majority of my normal maps are in 3-channel RGB 8bits-per-channel format.
Looking through the DXGI_FORMAT msdn page I've noticed that there's no option for this. What's the reasoning behind this? How would I use this texture format then?
Upvotes: 1
Views: 1431
Reputation: 8824
There is no hardware that support a 24bits format texture for a good decade now.
You have different options now :
GPU are not the best at reading a lot of uncompressed textures. Of course, if you are only rendering a few models, it won't matter, but if you start pushing a larger amount of data, you have to go to the compressed road.
Your compression options if you support very old hardware:
You should consider these instead :
sqrt(1 - dot(n.xy,n.yx))
or an equivalent tricks.On a side note, do not forget to generate a mip chains up to an 1x1 size, it is both for performance and visual quality. Do not apply a SRGB conversion like you should have for your albedos ( 0.5 is really 0.5) and you have options with some formats to use an SNORM type to skip the typical 2*n-1
formula but be carreful with the 0 case.
Upvotes: 3