mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Fix] (MG_Backend/DirectGLES): support Sundial Lite shader pack
This commit is contained in:
@@ -148,6 +148,8 @@ namespace MobileGL {
|
||||
return TextureInternalFormat::RGBA12;
|
||||
case GL_RGBA16:
|
||||
return TextureInternalFormat::RGBA16;
|
||||
case GL_RGBA16_SNORM:
|
||||
return TextureInternalFormat::RGBA16Snorm;
|
||||
case GL_SRGB8:
|
||||
return TextureInternalFormat::SRGB8;
|
||||
case GL_SRGB8_ALPHA8:
|
||||
|
||||
@@ -132,6 +132,8 @@ namespace MobileGL {
|
||||
return GL_RGBA12;
|
||||
case TextureInternalFormat::RGBA16:
|
||||
return GL_RGBA16;
|
||||
case TextureInternalFormat::RGBA16Snorm:
|
||||
return GL_RGBA16_SNORM;
|
||||
case TextureInternalFormat::SRGB8:
|
||||
return GL_SRGB8;
|
||||
case TextureInternalFormat::SRGB8Alpha8:
|
||||
|
||||
@@ -81,6 +81,7 @@ namespace MobileGL {
|
||||
case TextureInternalFormat::RGB10A2UI:
|
||||
case TextureInternalFormat::RGBA12:
|
||||
case TextureInternalFormat::RGBA16:
|
||||
case TextureInternalFormat::RGBA16Snorm:
|
||||
case TextureInternalFormat::SRGB8:
|
||||
case TextureInternalFormat::SRGB8Alpha8:
|
||||
case TextureInternalFormat::R16F:
|
||||
@@ -284,6 +285,7 @@ namespace MobileGL {
|
||||
case TextureInternalFormat::RGB10A2UI:
|
||||
case TextureInternalFormat::RGBA12:
|
||||
case TextureInternalFormat::RGBA16:
|
||||
case TextureInternalFormat::RGBA16Snorm:
|
||||
case TextureInternalFormat::SRGB8Alpha8:
|
||||
case TextureInternalFormat::RGBA16F:
|
||||
case TextureInternalFormat::RGBA32F:
|
||||
@@ -312,4 +314,4 @@ namespace MobileGL {
|
||||
}
|
||||
}
|
||||
} // namespace MG_Util
|
||||
} // namespace MobileGL
|
||||
} // namespace MobileGL
|
||||
|
||||
@@ -132,6 +132,8 @@ namespace MobileGL {
|
||||
return "RGBA12";
|
||||
case TextureInternalFormat::RGBA16:
|
||||
return "RGBA16";
|
||||
case TextureInternalFormat::RGBA16Snorm:
|
||||
return "RGBA16Snorm";
|
||||
case TextureInternalFormat::SRGB8:
|
||||
return "SRGB8";
|
||||
case TextureInternalFormat::SRGB8Alpha8:
|
||||
|
||||
@@ -128,6 +128,8 @@ namespace MobileGL {
|
||||
return VK_FORMAT_A2R10G10B10_UINT_PACK32;
|
||||
case TextureInternalFormat::RGBA16:
|
||||
return VK_FORMAT_R16G16B16A16_UNORM;
|
||||
case TextureInternalFormat::RGBA16Snorm:
|
||||
return VK_FORMAT_R16G16B16A16_SNORM;
|
||||
case TextureInternalFormat::SRGB8:
|
||||
return VK_FORMAT_R8G8B8_SRGB;
|
||||
case TextureInternalFormat::SRGB8Alpha8:
|
||||
|
||||
@@ -45,8 +45,6 @@ namespace MobileGL {
|
||||
|
||||
case TextureInternalFormat::RGB10:
|
||||
case TextureInternalFormat::RGB12:
|
||||
case TextureInternalFormat::RGB16:
|
||||
case TextureInternalFormat::RGB16Snorm:
|
||||
case TextureInternalFormat::RGBA2:
|
||||
case TextureInternalFormat::RGBA4:
|
||||
case TextureInternalFormat::RGB5A1:
|
||||
@@ -73,6 +71,8 @@ namespace MobileGL {
|
||||
case TextureInternalFormat::RG16F:
|
||||
return 4;
|
||||
|
||||
case TextureInternalFormat::RGB16:
|
||||
case TextureInternalFormat::RGB16Snorm:
|
||||
case TextureInternalFormat::RGB16F:
|
||||
case TextureInternalFormat::RGB16I:
|
||||
case TextureInternalFormat::RGB16UI:
|
||||
@@ -80,6 +80,7 @@ namespace MobileGL {
|
||||
|
||||
case TextureInternalFormat::RGBA12:
|
||||
case TextureInternalFormat::RGBA16:
|
||||
case TextureInternalFormat::RGBA16Snorm:
|
||||
case TextureInternalFormat::RGBA16I:
|
||||
case TextureInternalFormat::RGBA16UI:
|
||||
case TextureInternalFormat::RGBA16F:
|
||||
@@ -208,6 +209,7 @@ namespace MobileGL {
|
||||
case TextureInternalFormat::SRGB8Alpha8:
|
||||
case TextureInternalFormat::RGBA12:
|
||||
case TextureInternalFormat::RGBA16:
|
||||
case TextureInternalFormat::RGBA16Snorm:
|
||||
case TextureInternalFormat::RGBA16I:
|
||||
case TextureInternalFormat::RGBA16UI:
|
||||
case TextureInternalFormat::RGBA16F:
|
||||
@@ -424,6 +426,7 @@ namespace MobileGL {
|
||||
s.Alpha = 12;
|
||||
break;
|
||||
case TextureInternalFormat::RGBA16:
|
||||
case TextureInternalFormat::RGBA16Snorm:
|
||||
case TextureInternalFormat::RGBA16I:
|
||||
case TextureInternalFormat::RGBA16UI:
|
||||
case TextureInternalFormat::RGBA16F:
|
||||
|
||||
@@ -391,6 +391,8 @@ namespace MobileGL {
|
||||
RenameBuiltinShadowingFunction(source, "round", "mg_round");
|
||||
RenameBuiltinShadowingFunction(source, "tanh", "mg_tanh");
|
||||
RenameBuiltinShadowingFunction(source, "fma", "mg_fma");
|
||||
RenameBuiltinShadowingFunction(source, "min3", "mg_min3");
|
||||
RenameBuiltinShadowingFunction(source, "max3", "mg_max3");
|
||||
ModernizeLegacyGLSL(stage, source);
|
||||
InjectDepthRangeBuiltinShim(stage, source);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user