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/surface_ES2.frag | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/datavisualization/engine/shaders/surface_ES2.frag') diff --git a/src/datavisualization/engine/shaders/surface_ES2.frag b/src/datavisualization/engine/shaders/surface_ES2.frag index c7e75594..0e17cacd 100644 --- a/src/datavisualization/engine/shaders/surface_ES2.frag +++ b/src/datavisualization/engine/shaders/surface_ES2.frag @@ -9,12 +9,13 @@ uniform sampler2D textureSampler; uniform highp vec3 lightPosition_wrld; uniform highp float lightStrength; uniform highp float ambientStrength; +uniform highp vec3 lightColor; 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 float distance = length(lightPosition_wrld - position_wrld); -- cgit v1.2.3