|
@@ -32,6 +32,7 @@
|
|
|
|
|
|
#include "core/os/memory.h"
|
|
#include "core/os/memory.h"
|
|
#include "core/print_string.h"
|
|
#include "core/print_string.h"
|
|
|
|
+#include "core/project_settings.h"
|
|
#include "core/string_builder.h"
|
|
#include "core/string_builder.h"
|
|
#include "rasterizer_gles2.h"
|
|
#include "rasterizer_gles2.h"
|
|
#include "rasterizer_storage_gles2.h"
|
|
#include "rasterizer_storage_gles2.h"
|
|
@@ -180,6 +181,12 @@ ShaderGLES2::Version *ShaderGLES2::get_current_version() {
|
|
strings.push_back("#define USE_HIGHP_PRECISION\n");
|
|
strings.push_back("#define USE_HIGHP_PRECISION\n");
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+ if (GLOBAL_GET("rendering/gles2/compatibility/enable_high_float.Android")) {
|
|
|
|
+ // enable USE_HIGHP_PRECISION but safeguarded by an availability check as highp support is optional in GLES2
|
|
|
|
+ // see Section 4.5.4 of the GLSL_ES_Specification_1.00
|
|
|
|
+ strings.push_back("#ifdef GL_FRAGMENT_PRECISION_HIGH\n #define USE_HIGHP_PRECISION\n#endif\n");
|
|
|
|
+ }
|
|
|
|
+
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#ifdef ANDROID_ENABLED
|
|
#ifdef ANDROID_ENABLED
|