summaryrefslogtreecommitdiff
path: root/drivers/gles2/shaders/canvas.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles2/shaders/canvas.glsl')
-rw-r--r--drivers/gles2/shaders/canvas.glsl15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl
index 0de60d7421..d483659e4d 100644
--- a/drivers/gles2/shaders/canvas.glsl
+++ b/drivers/gles2/shaders/canvas.glsl
@@ -433,19 +433,14 @@ FRAGMENT_SHADER_CODE
#ifdef SHADOW_USE_GRADIENT
-#define SHADOW_TEST(m_ofs) \
- { \
- highp float sd = SHADOW_DEPTH(shadow_texture, vec2(m_ofs, sh)); \
- shadow_attenuation += 1.0 - smoothstep(sd, sd + shadow_gradient, sz); \
- }
+ /* clang-format off */
+ /* GLSL es 100 doesn't support line continuation characters(backslashes) */
+#define SHADOW_TEST(m_ofs) { highp float sd = SHADOW_DEPTH(shadow_texture, vec2(m_ofs, sh)); shadow_attenuation += 1.0 - smoothstep(sd, sd + shadow_gradient, sz); }
#else
-#define SHADOW_TEST(m_ofs) \
- { \
- highp float sd = SHADOW_DEPTH(shadow_texture, vec2(m_ofs, sh)); \
- shadow_attenuation += step(sz, sd); \
- }
+#define SHADOW_TEST(m_ofs) { highp float sd = SHADOW_DEPTH(shadow_texture, vec2(m_ofs, sh)); shadow_attenuation += step(sz, sd); }
+ /* clang-format on */
#endif