summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/shaders/texture_ES2.frag
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-11-13 07:30:00 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-11-13 08:08:25 +0200
commitd0d0ee40e85e9af4dcf36dcf0af3035daaf5ea82 (patch)
treeacc40a337c01f68745b7d04750b4326f93e804ad /src/datavisualization/engine/shaders/texture_ES2.frag
parent0f3874eae3128ccd0b547f974555534a6cb8874a (diff)
Removed unused and duplicate shaders
- texture.frag, texture.vert and texture_ES2.frag are used in Q3DMaps if it is reintroduced some day Change-Id: I80e838ce2471ecef45d7662c59d8fbc74bf72769 Change-Id: I80e838ce2471ecef45d7662c59d8fbc74bf72769 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/datavisualization/engine/shaders/texture_ES2.frag')
-rw-r--r--src/datavisualization/engine/shaders/texture_ES2.frag37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/datavisualization/engine/shaders/texture_ES2.frag b/src/datavisualization/engine/shaders/texture_ES2.frag
deleted file mode 100644
index 58097ba5..00000000
--- a/src/datavisualization/engine/shaders/texture_ES2.frag
+++ /dev/null
@@ -1,37 +0,0 @@
-uniform highp vec3 lightPosition_wrld;
-uniform highp vec3 color_mdl;
-uniform highp float lightStrength;
-uniform highp float ambientStrength;
-uniform sampler2D textureSampler;
-
-varying highp vec2 UV;
-varying highp vec3 position_wrld;
-varying highp vec3 normal_cmr;
-varying highp vec3 eyeDirection_cmr;
-varying highp vec3 lightDirection_cmr;
-
-void main() {
- highp vec3 materialDiffuseColor = texture2D(textureSampler, UV).rgb;
- highp vec3 materialAmbientColor = vec3(ambientStrength, ambientStrength, ambientStrength) * materialDiffuseColor;
- highp vec3 materialSpecularColor = vec3(1.0, 1.0, 1.0);
-
- highp float distance = length(lightPosition_wrld - position_wrld);
- highp vec3 n = normalize(normal_cmr);
- highp vec3 l = normalize(lightDirection_cmr);
- highp float cosTheta = dot(n, l);
- if (cosTheta < 0.0) cosTheta = 0.0;
- else if (cosTheta > 1.0) cosTheta = 1.0;
-
- highp vec3 E = normalize(eyeDirection_cmr);
- highp vec3 R = reflect(-l, n);
- highp float cosAlpha = dot(E, R);
- if (cosAlpha < 0.0) cosAlpha = 0.0;
- else if (cosAlpha > 1.0) cosAlpha = 1.0;
-
- gl_FragColor.rgb =
- materialAmbientColor +
- materialDiffuseColor * lightStrength * (cosTheta * cosTheta) / distance +
- materialSpecularColor * lightStrength * (cosAlpha * cosAlpha * cosAlpha * cosAlpha * cosAlpha) / distance;
- gl_FragColor.a = texture2D(textureSampler, UV).a;
-}
-