diff options
Diffstat (limited to 'src/datavisualization/engine/shaders/surfaceFlat.frag')
-rw-r--r-- | src/datavisualization/engine/shaders/surfaceFlat.frag | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/datavisualization/engine/shaders/surfaceFlat.frag b/src/datavisualization/engine/shaders/surfaceFlat.frag index eb398582..a8a3dbb1 100644 --- a/src/datavisualization/engine/shaders/surfaceFlat.frag +++ b/src/datavisualization/engine/shaders/surfaceFlat.frag @@ -1,6 +1,5 @@ #version 150 -varying highp vec2 UV; varying highp vec3 coords_mdl; varying highp vec3 position_wrld; flat in highp vec3 normal_cmr; @@ -13,7 +12,7 @@ uniform highp float lightStrength; uniform highp float ambientStrength; void main() { - highp vec2 gradientUV = vec2(0.5, (coords_mdl.y + 1.0) / 2.0); + highp vec2 gradientUV = vec2(0.0, (coords_mdl.y + 1.001) / 2.0); // 1000 pixel texture, we need a margin for 1/1000 rounding error 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); @@ -28,7 +27,6 @@ void main() { highp vec3 R = reflect(-l, n); highp float cosAlpha = clamp(dot(E, R), 0.0, 1.0); -// gl_FragColor.rgb = materialDiffuseColor; gl_FragColor.rgb = materialAmbientColor + materialDiffuseColor * lightStrength * pow(cosTheta, 2) / distance + |