diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2016-09-07 00:22:28 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2016-09-07 00:51:03 +0200 |
commit | b69e422af930ba6b6e539607e9c7cf0b962ee196 (patch) | |
tree | e6f580e77a8914f553582a19b8208b5d5d918658 /drivers/gles2/shaders/material.glsl | |
parent | 6f7b2d277fc068264b72b0a39d464da03807c628 (diff) |
Rename misleading define
The macro USE_LIGHT_SHADOW_COLOR actually was being defined when the shader used SHADOW (the output shadow color), not the shadow color set for the light so it's better named USE_OUTPUT_SHADOW_COLOR. In 3D there's not that difference but renaming as well for consistency.
Diffstat (limited to 'drivers/gles2/shaders/material.glsl')
-rw-r--r-- | drivers/gles2/shaders/material.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl index e68949b056..0d63f85ec5 100644 --- a/drivers/gles2/shaders/material.glsl +++ b/drivers/gles2/shaders/material.glsl @@ -1181,7 +1181,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 @@ -1205,7 +1205,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 |