diff options
Diffstat (limited to 'drivers/gles2/shaders/canvas_shadow.glsl')
-rw-r--r-- | drivers/gles2/shaders/canvas_shadow.glsl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gles2/shaders/canvas_shadow.glsl b/drivers/gles2/shaders/canvas_shadow.glsl index 01b2c59325..7a5ba4f571 100644 --- a/drivers/gles2/shaders/canvas_shadow.glsl +++ b/drivers/gles2/shaders/canvas_shadow.glsl @@ -34,9 +34,14 @@ void main() { #define mediump #define highp #else +#if defined(USE_HIGHP_PRECISION) +precision highp float; +precision highp int; +#else precision mediump float; precision mediump int; #endif +#endif varying highp vec4 position_interp; /* clang-format on */ @@ -47,8 +52,8 @@ void main() { #ifdef USE_RGBA_SHADOWS - highp vec4 comp = fract(depth * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0)); - comp -= comp.xxyz * vec4(0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0); + highp vec4 comp = fract(depth * vec4(255.0 * 255.0 * 255.0, 255.0 * 255.0, 255.0, 1.0)); + comp -= comp.xxyz * vec4(0.0, 1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0); gl_FragColor = comp; #else |