Skip to content

Commit

Permalink
Use correct mode for DXT1 textures.
Browse files Browse the repository at this point in the history
libsquish, which is used to generate all S3TC textures, works only with RGBA textures.

Fixes #8550.
  • Loading branch information
tagcup committed Apr 30, 2017
1 parent de7eba8 commit 2f84731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gles3/rasterizer_storage_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2f84731

Please sign in to comment.