From 1a9b62dc661a26c02db34ab5075b4e209a70b196 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 24 Feb 2016 20:21:10 +0000 Subject: slideshow: Only use texture() in GLSL 1.50, fixes Intel on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit texture2D() is still available, but not in the geometry stage, so better be consistent everywhere. Change-Id: I86bf1921713bcbf32946190525401bfcc633a69f Reviewed-on: https://gerrit.libreoffice.org/22468 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- slideshow/opengl/vortexFragmentShader.glsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'slideshow/opengl/vortexFragmentShader.glsl') diff --git a/slideshow/opengl/vortexFragmentShader.glsl b/slideshow/opengl/vortexFragmentShader.glsl index 3212ebef7661..a3f8191eeb78 100644 --- a/slideshow/opengl/vortexFragmentShader.glsl +++ b/slideshow/opengl/vortexFragmentShader.glsl @@ -20,12 +20,12 @@ in vec4 shadowCoordinate; void main() { vec3 lightVector = vec3(0.0, 0.0, 1.0); float light = max(dot(lightVector, v_normal), 0.0); - vec4 fragment = texture2D(slideTexture, v_texturePosition); + vec4 fragment = texture(slideTexture, v_texturePosition); float visibility = 1.0; const float epsilon = 0.0001; - if (texture2D(leavingShadowTexture, shadowCoordinate.xy).r < shadowCoordinate.z - epsilon) + if (texture(leavingShadowTexture, shadowCoordinate.xy).r < shadowCoordinate.z - epsilon) visibility *= 0.7; - if (texture2D(enteringShadowTexture, shadowCoordinate.xy).r < shadowCoordinate.z - epsilon) + if (texture(enteringShadowTexture, shadowCoordinate.xy).r < shadowCoordinate.z - epsilon) visibility *= 0.7; vec4 black = vec4(0.0, 0.0, 0.0, fragment.a); gl_FragColor = mix(black, fragment, visibility * light); -- cgit