fix s3tc support detection for webgl
This commit is contained in:
parent
d9268265dc
commit
d1e399a971
1 changed files with 3 additions and 3 deletions
|
@ -195,11 +195,11 @@ Ref<Image> RasterizerStorageGLES2::_get_gl_image_and_format(const Ref<Image> &p_
|
||||||
} break;
|
} break;
|
||||||
case Image::FORMAT_DXT1: {
|
case Image::FORMAT_DXT1: {
|
||||||
|
|
||||||
r_compressed = true;
|
|
||||||
if (config.s3tc_supported) {
|
if (config.s3tc_supported) {
|
||||||
r_gl_internal_format = _EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
r_gl_internal_format = _EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
||||||
r_gl_format = GL_RGBA;
|
r_gl_format = GL_RGBA;
|
||||||
r_gl_type = GL_UNSIGNED_BYTE;
|
r_gl_type = GL_UNSIGNED_BYTE;
|
||||||
|
r_compressed = true;
|
||||||
} else {
|
} else {
|
||||||
need_decompress = true;
|
need_decompress = true;
|
||||||
}
|
}
|
||||||
|
@ -4868,8 +4868,8 @@ void RasterizerStorageGLES2::initialize() {
|
||||||
config.etc1_supported = false;
|
config.etc1_supported = false;
|
||||||
#else
|
#else
|
||||||
config.float_texture_supported = config.extensions.has("GL_ARB_texture_float") || config.extensions.has("GL_OES_texture_float");
|
config.float_texture_supported = config.extensions.has("GL_ARB_texture_float") || config.extensions.has("GL_OES_texture_float");
|
||||||
config.s3tc_supported = config.extensions.has("GL_EXT_texture_compression_s3tc");
|
config.s3tc_supported = config.extensions.has("GL_EXT_texture_compression_s3tc") || config.extensions.has("WEBGL_compressed_texture_s3tc");
|
||||||
config.etc1_supported = config.extensions.has("GL_OES_compressed_ETC1_RGB8_texture");
|
config.etc1_supported = config.extensions.has("GL_OES_compressed_ETC1_RGB8_texture") || config.extensions.has("WEBGL_compressed_texture_etc1");
|
||||||
#endif
|
#endif
|
||||||
#ifdef GLES_OVER_GL
|
#ifdef GLES_OVER_GL
|
||||||
config.use_rgba_2d_shadows = false;
|
config.use_rgba_2d_shadows = false;
|
||||||
|
|
Loading…
Reference in a new issue