Wednesday, May 15, 2024
HomeGame Developmenttextures - Failure on DX11Texturesavetofile for B5G6R5_UNORM format

textures – Failure on DX11Texturesavetofile for B5G6R5_UNORM format


I have a protocol to prepare with a combining shader a texture from two other textures and saving it in RGBA8_UNORM DDS format using DX11SaveTextureToFile. Works fine. It appears to me that I don’t really need the A channel and want to use RGB565_UNORM instead with the corresponding combining shader. But the outputed file can’t be reopen, including with DXtexTool. The DX11CfreateShaderResourceViewFromFile return E_FAIL.
I’ve seen that some header is added for non standard RGB format but I guess this may be handled by the loader/saver functions.

I use DX11CfreateShaderResourceViewFromFile this way:

DX11CreateShaderResourceViewFromFile(pDC11, FileName, NULL, NULL, &pSRV, NULL);

Should I add someting to consider any added header?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments