[Fix]: fix Complementary

- add a DirectGLES ANGLE fallback control for 8-bit SNORM texture formats

- normalize SNORM8 textures to float storage so ANGLE can render Complementary intermediate framebuffers

- reuse the normalized upload conversion path for SNORM8 and existing norm16 float fallbacks
This commit is contained in:
2026-06-23 07:37:25 +08:00
parent 3f53041ed2
commit 18d19a9a8b
4 changed files with 75 additions and 14 deletions
@@ -82,6 +82,34 @@ namespace MobileGL::MG_Util::TextureFormatProcessor {
}
*outInternalFormat = internalFormat;
break;
case GL_RGBA8_SNORM:
if (options & PixelFormatNormalizeOptionBit::NoSnorm8) {
*outInternalFormat = GL_RGBA16F;
break;
}
*outInternalFormat = internalFormat;
break;
case GL_RGB8_SNORM:
if (options & PixelFormatNormalizeOptionBit::NoSnorm8) {
*outInternalFormat = GL_RGB16F;
break;
}
*outInternalFormat = internalFormat;
break;
case GL_RG8_SNORM:
if (options & PixelFormatNormalizeOptionBit::NoSnorm8) {
*outInternalFormat = GL_RG16F;
break;
}
*outInternalFormat = internalFormat;
break;
case GL_R8_SNORM:
if (options & PixelFormatNormalizeOptionBit::NoSnorm8) {
*outInternalFormat = GL_R16F;
break;
}
*outInternalFormat = internalFormat;
break;
default:
*outInternalFormat = internalFormat;
break;
@@ -296,6 +324,10 @@ namespace MobileGL::MG_Util::TextureFormatProcessor {
case GL_RGB8_SNORM:
case GL_RG8_SNORM:
case GL_R8_SNORM:
if (options & PixelFormatNormalizeOptionBit::NoSnorm8) {
*outType = GL_FLOAT;
break;
}
*outType = GL_BYTE;
break;