summaryrefslogtreecommitdiff
path: root/drivers/gles2/shaders
diff options
context:
space:
mode:
authorSaracen <SaracenOne@gmail.com>2016-01-31 12:56:53 +0000
committerSaracen <SaracenOne@gmail.com>2016-02-06 18:03:20 +0000
commitde5281c3989fd4071cf57e5b7bc0cbbc174524e8 (patch)
tree085eb62134c2d04811af67dba0231a03dd4b5edc /drivers/gles2/shaders
parent987bfb4b5e99bb11ecfd914e80d59b9bde62e26f (diff)
Ability to colourize baked lighting in real time.
Diffstat (limited to 'drivers/gles2/shaders')
-rw-r--r--drivers/gles2/shaders/material.glsl10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl
index ccd80bf2f0..e68949b056 100644
--- a/drivers/gles2/shaders/material.glsl
+++ b/drivers/gles2/shaders/material.glsl
@@ -618,6 +618,12 @@ uniform float ambient_dp_sampler_multiplier;
#endif
+#ifdef ENABLE_AMBIENT_COLOR
+
+uniform vec3 ambient_color;
+
+#endif
+
FRAGMENT_SHADER_GLOBALS
@@ -1262,7 +1268,9 @@ LIGHT_SHADER_CODE
#if defined(ENABLE_AMBIENT_OCTREE) || defined(ENABLE_AMBIENT_LIGHTMAP) || defined(ENABLE_AMBIENT_DP_SAMPLER)
-
+#if defined(ENABLE_AMBIENT_COLOR)
+ ambientmap_color*=ambient_color;
+#endif
diffuse.rgb+=ambientmap_color;
#endif