diff options
author | Ferenc Arn <tagcup@yahoo.com> | 2017-04-29 20:01:12 -0500 |
---|---|---|
committer | Ferenc Arn <tagcup@yahoo.com> | 2017-04-29 20:01:12 -0500 |
commit | 2f847311776f799a24630b20f7ca6c06eea22ab0 (patch) | |
tree | 41b7c9622caaa1271a82e4f1653f3a8ad9fcb069 | |
parent | de7eba887e9fe940dac0958836fa8fb778628d2a (diff) |
Use correct mode for DXT1 textures.
libsquish, which is used to generate all S3TC textures, works only with RGBA textures.
Fixes #8550.
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 73547b5a16..1025acceb4 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -245,7 +245,7 @@ Image RasterizerStorageGLES3::_get_gl_image_and_format(const Image &p_image, Ima if (config.s3tc_supported) { - r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_S3TC_DXT1_NV : _EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT; + r_gl_internal_format = (config.srgb_decode_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV : _EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT; r_gl_format = GL_RGBA; r_gl_type = GL_UNSIGNED_BYTE; r_compressed = true; |