In Direct3D 11 (Ogre 1.10) there is some code in D3D11Texture::createInternalResourcesImpl that changes L8 to R8G8B8, which means our application can't use it anymore (we really need the 8-bit pixel size). The proposed solution by the inline comment is to use PF_R8... But, PF_R8 does not have any mapping in D3D11Mappings::_getPF.. I believe there should be a mapping to DXGI_FORMAT_R8_UNORM which is currently missing?!
Code: Select all
// PF_L8 maps to DXGI_FORMAT_R8_UNORM and grayscale textures became "redscale", without green and blue components. // This can be fixed by shader modification, but here we can only convert PF_L8 to PF_R8G8B8 manually to fix the issue. // Note, that you can use PF_R8 to explicitly request "redscale" behavior for grayscale textures, avoiding overhead. if(mFormat == PF_L8) mFormat = PF_R8G8B8;
(I haven't tried this in Ogre 2.1, but by looking at the code there seems to be similar lack of mappings in D3D11Mappings::_getPF)
How about adding a mapping from PF_R8 to DXGI_FORMAT_R8_UNORM in latest 1.10? (and preferably in 2.1 etc as well)