From 44eb01695a1e8f4322ca2f8553c98c5d5523c93e Mon Sep 17 00:00:00 2001 From: Zeg9 Date: Fri, 2 Aug 2013 12:32:21 +0200 Subject: Fix texture bumpmapping on some GPUs --- client/shaders/bumpmaps_liquids/opengl_fragment.glsl | 3 +-- client/shaders/bumpmaps_solids/opengl_fragment.glsl | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'client') diff --git a/client/shaders/bumpmaps_liquids/opengl_fragment.glsl b/client/shaders/bumpmaps_liquids/opengl_fragment.glsl index ea618384f..bf6bbf043 100644 --- a/client/shaders/bumpmaps_liquids/opengl_fragment.glsl +++ b/client/shaders/bumpmaps_liquids/opengl_fragment.glsl @@ -26,8 +26,7 @@ void main (void) float specular = pow(clamp(dot(R, lVec), 0.0, 1.0),1.0); - vec4 vSpecular = 0.2*specular * diffuse; - color += vSpecular; + color += vec3(0.2*specular*diffuse); col = vec4(color.r, color.g, color.b, alpha); diff --git a/client/shaders/bumpmaps_solids/opengl_fragment.glsl b/client/shaders/bumpmaps_solids/opengl_fragment.glsl index 6203592f7..c72e8cbce 100644 --- a/client/shaders/bumpmaps_solids/opengl_fragment.glsl +++ b/client/shaders/bumpmaps_solids/opengl_fragment.glsl @@ -26,8 +26,7 @@ void main (void) float specular = pow(clamp(dot(R, lVec), 0.0, 1.0),1.0); - vec4 vSpecular = 0.2*specular * diffuse; - color += vSpecular; + color += vec3(0.2*specular*diffuse); col = vec4(color.r, color.g, color.b, alpha); -- cgit v1.2.3