Merge pull request #25196 from santouits/webgl-backslashes
webgl1 in firefox doesn't like backslashes in #define directive
This commit is contained in:
commit
3548b6b6b2
1 changed files with 5 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue