From 51deca1429e1097be3108a5dc28a4897944fed1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Mon, 20 Jan 2014 09:43:57 +0200 Subject: References to alpha and TP removed + implemented the rest of lightColor Task-number: QTRD-2405 Change-Id: I38402b45cc4a567a79d07b23983567551d06b4fe Reviewed-by: Miikka Heikkinen --- src/datavisualization/engine/shaders/surfaceShadowFlat.frag | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/datavisualization/engine/shaders/surfaceShadowFlat.frag') diff --git a/src/datavisualization/engine/shaders/surfaceShadowFlat.frag b/src/datavisualization/engine/shaders/surfaceShadowFlat.frag index 6341136e..b2f2af74 100644 --- a/src/datavisualization/engine/shaders/surfaceShadowFlat.frag +++ b/src/datavisualization/engine/shaders/surfaceShadowFlat.frag @@ -15,6 +15,7 @@ uniform highp vec3 lightPosition_wrld; uniform highp float lightStrength; uniform highp float ambientStrength; uniform highp float shadowQuality; +uniform highp vec3 lightColor; highp vec2 poissonDisk[16] = vec2[16](vec2(-0.94201624, -0.39906216), vec2(0.94558609, -0.76890725), @@ -36,8 +37,8 @@ highp vec2 poissonDisk[16] = vec2[16](vec2(-0.94201624, -0.39906216), void main() { highp vec2 gradientUV = vec2(0.0, (coords_mdl.y + 1.0) / 2.0); highp vec3 materialDiffuseColor = texture2D(textureSampler, gradientUV).xyz; - 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); -- cgit v1.2.3