summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/shaders/shadowNoTex.frag
diff options
context:
space:
mode:
Diffstat (limited to 'src/datavisualization/engine/shaders/shadowNoTex.frag')
-rw-r--r--src/datavisualization/engine/shaders/shadowNoTex.frag5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/datavisualization/engine/shaders/shadowNoTex.frag b/src/datavisualization/engine/shaders/shadowNoTex.frag
index 0252ba49..12e86cb3 100644
--- a/src/datavisualization/engine/shaders/shadowNoTex.frag
+++ b/src/datavisualization/engine/shaders/shadowNoTex.frag
@@ -5,6 +5,7 @@ uniform highp float ambientStrength;
uniform highp float shadowQuality;
uniform highp vec3 color_mdl;
uniform highp sampler2DShadow shadowMap;
+uniform highp vec3 lightColor;
varying highp vec4 shadowCoord;
varying highp vec3 position_wrld;
@@ -54,8 +55,8 @@ highp vec2 poissonDisk[16] = vec2[16](vec2(-0.94201624, -0.39906216),
void main() {
highp vec3 materialDiffuseColor = color_mdl.rgb;
- highp vec3 materialAmbientColor = vec3(ambientStrength, ambientStrength, ambientStrength) * materialDiffuseColor;
- highp vec3 materialSpecularColor = vec3(1.0, 1.0, 1.0);
+ highp vec3 materialAmbientColor = lightColor * ambientStrength * materialDiffuseColor;
+ highp vec3 materialSpecularColor = lightColor;
highp vec3 n = normalize(normal_cmr);
highp vec3 l = normalize(lightDirection_cmr);