summaryrefslogtreecommitdiff
path: root/drivers/gles2/shaders/material.glsl
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-09-17 18:34:22 +0200
committerGitHub <noreply@github.com>2016-09-17 18:34:22 +0200
commit80861b7d59b22010d6e3f4ee90c4bb97631ac20f (patch)
tree3fc1d3fdef39a5c8a6f0f9c8c25fb12ae8bd3250 /drivers/gles2/shaders/material.glsl
parentc05ff0577fd9cc39a6968e65743f7d7da711bfe2 (diff)
parent09608876258ffa7d19be1fb887541f3798fa945e (diff)
Merge pull request #6414 from RandomShaper/improve-shader-shadow
Expose additional light/shadow properties to canvas item shaders
Diffstat (limited to 'drivers/gles2/shaders/material.glsl')
-rw-r--r--drivers/gles2/shaders/material.glsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl
index fd778f3442..477a451f2f 100644
--- a/drivers/gles2/shaders/material.glsl
+++ b/drivers/gles2/shaders/material.glsl
@@ -1185,7 +1185,7 @@ FRAGMENT_SHADER_CODE
vec3 mdiffuse = diffuse.rgb;
vec3 light;
-#if defined(USE_LIGHT_SHADOW_COLOR)
+#if defined(USE_OUTPUT_SHADOW_COLOR)
vec3 shadow_color=vec3(0.0,0.0,0.0);
#endif
@@ -1209,7 +1209,7 @@ LIGHT_SHADER_CODE
#endif
diffuse.rgb = const_light_mult * ambient_light *diffuse.rgb + light * attenuation * shadow_attenuation;
-#if defined(USE_LIGHT_SHADOW_COLOR)
+#if defined(USE_OUTPUT_SHADOW_COLOR)
diffuse.rgb += light * shadow_color * attenuation * (1.0 - shadow_attenuation);
#endif