   sRGB minefield--D3DX11CreateTextureFromXX is busted
  I've encountered numerous caveats while investigating a properly gamma/sRGB-corrected pipeline. I thought I would share them here for the benefit of those who haven't embarked on this yet. I wouldn't be surprised if some who think they've got a gamma-correct pipeline/engine have actually got it wrong.If you use D3DX11CreateTextureFromFile/Memory to create a _TYPELESS format DXT/BCx texture (to later attach an _SRGB view), it fails and spews an unrelated error message to the output. The non-BCx formats work fine, however.Another problem with D3DX11CreateTextureFrom* is that if you try to create a _SRGB format texture (not just DXT/BCx, but any _SRGB format) it will actually apply the correction to the texture data rather than just "reinterpreting". Of course this quantizes the colors, which looks awful, but then when you attach a _SRGB view you end up with *double correction*.I hope the next SDK revision (June 2010) fixes this but I'm not very hopeful. In the meantime I'll use a different DDS loader.Finally, nvidia's DDS plug-in for Photoshop defaults to standard gamma 2.2 as the exponent for gamma correct mip filtering, but incorrectly applies gamma correction/filtering/inverse gamma correction in reverse order, compounding the nonlinear filtering rather than linearizing it. Fortunately this is easily fixed by specifying the inverse standard gamma exponent (0.4545) in the box provided.It seems like there's a general lack of information about color correction issues and obvious misunderstanding by implementors of APIs and tools, so be careful and do your own testing. If in doubt, skip it--wrong gamma correction is usually worse than no gamma correction.   
  By the way I'm using v8.23 of nvidia's DDS plugin and the February 2010 DXSDK... if you're reading this from the future be aware it may be completely different in your then-latest version ;)   