mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 22:28:32 +09:00
[Fix] (MG_Util/Texture): fix D32 depth format in NormalizePixelFormat, fixing Photon shadow
This commit is contained in:
@@ -28,8 +28,8 @@ namespace MobileGL::MG_Util::TextureFormatProcessor {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GL_DEPTH_COMPONENT32:
|
case GL_DEPTH_COMPONENT32:
|
||||||
if (outInternalFormat) *outInternalFormat = GL_DEPTH_COMPONENT32F;
|
if (outInternalFormat) *outInternalFormat = GL_DEPTH_COMPONENT;
|
||||||
if (outType) *outType = GL_FLOAT;
|
if (outType) *outType = GL_UNSIGNED_INT;
|
||||||
if (outFormat) *outFormat = GL_DEPTH_COMPONENT;
|
if (outFormat) *outFormat = GL_DEPTH_COMPONENT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ namespace MobileGL::MG_Util::TextureFormatProcessor {
|
|||||||
break;
|
break;
|
||||||
case GL_DEPTH32F_STENCIL8:
|
case GL_DEPTH32F_STENCIL8:
|
||||||
case GL_DEPTH_STENCIL:
|
case GL_DEPTH_STENCIL:
|
||||||
if (outInternalFormat) *outInternalFormat = GL_DEPTH32F_STENCIL8;
|
if (outInternalFormat) *outInternalFormat = internalFormat;
|
||||||
if (outType) *outType = GL_FLOAT_32_UNSIGNED_INT_24_8_REV;
|
if (outType) *outType = GL_FLOAT_32_UNSIGNED_INT_24_8_REV;
|
||||||
if (outFormat) *outFormat = GL_DEPTH_STENCIL;
|
if (outFormat) *outFormat = GL_DEPTH_STENCIL;
|
||||||
break;
|
break;
|
||||||
@@ -215,8 +215,8 @@ namespace MobileGL::MG_Util::TextureFormatProcessor {
|
|||||||
are not supported here either.
|
are not supported here either.
|
||||||
```
|
```
|
||||||
*/
|
*/
|
||||||
if (outInternalFormat) *outInternalFormat = GL_R16F;
|
if (outInternalFormat) *outInternalFormat = GL_R16;
|
||||||
if (outType) *outType = GL_FLOAT;
|
if (outType) *outType = GL_UNSIGNED_SHORT;
|
||||||
if (outFormat) *outFormat = GL_RED;
|
if (outFormat) *outFormat = GL_RED;
|
||||||
break;
|
break;
|
||||||
case GL_R8:
|
case GL_R8:
|
||||||
|
|||||||
Reference in New Issue
Block a user