Allow custom visualisation shaders to be used with GLES

With GLES, a precision specifier is mandatory for float types.
Specifying one in the user shader is not enough because it happens too
late after uvec2 and uvec4 uses in the custom prefix.
This commit is contained in:
Le Philousophe
2025-04-24 12:18:02 +02:00
committed by Baldur Karlsson
parent e03ea6b040
commit bf1ebeeb86
+8
View File
@@ -219,6 +219,10 @@ float2 RD_SelectedRange()
const char GLSL_CUSTOM_PREFIX[] =
R"EOPREFIX(
#ifdef GL_ES
precision highp float;
#endif
#define RD_FLOAT_1D_ARRAY_BINDING 6
#define RD_FLOAT_1D_BINDING 6 // all textures treated as arrays, add macro aliases
@@ -372,6 +376,10 @@ vec2 RD_SelectedRange()
const char GLSL_CUSTOM_PREFIX[] =
R"EOPREFIX(
#ifdef GL_ES
precision highp float;
#endif
#define RD_FLOAT_1D_BINDING 1
#define RD_FLOAT_2D_BINDING 2
#define RD_FLOAT_3D_BINDING 3