DiligentCore icon indicating copy to clipboard operation
DiligentCore copied to clipboard

Wrong OpenGL equivalent for TEX_FORMAT_BC1_UNORM_SRGB

Open code-monkey-101 opened this issue 3 years ago • 4 comments

In GraphicTypes.h, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT is mentioned as the OpenGL counterpart of TEX_FORMAT_BC1_UNORM_SRGB (DXGI_FORMAT_BC1_UNORM_SRGB).

I think, the correct counterpart is GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT.

code-monkey-101 avatar Jul 12 '22 12:07 code-monkey-101

The engine currently uses GL_COMPRESSED_SRGB_S3TC_DXT1_EXT for TEX_FORMAT_BC1_UNORM_SRGB.

TheMostDiligent avatar Jul 12 '22 14:07 TheMostDiligent

That will probably ignore the alpha bit.

code-monkey-101 avatar Jul 12 '22 15:07 code-monkey-101

Do you need alpha?

TheMostDiligent avatar Jul 12 '22 15:07 TheMostDiligent

No, I'm good, thanks. I just noticed this when I was googling for the right OpenGL equivalent for BC1_UNORM_SRGB for my own engine ;)

code-monkey-101 avatar Jul 12 '22 16:07 code-monkey-101