summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>2016-02-24 20:21:10 +0000
committerjan iversen <jani@documentfoundation.org>2016-03-15 19:47:46 +0000
commitbd683e08cd614afdf3be1a8272200e39a38d9d0b (patch)
treec67a92454390e14a54887109156c4d275c131673
parentResolves: tdf#93196 add RecursionCounter guard also to InterpretFormulaGroup() (diff)
downloadcore-bd683e08cd614afdf3be1a8272200e39a38d9d0b.tar.gz
core-bd683e08cd614afdf3be1a8272200e39a38d9d0b.zip
slideshow: Only use texture() in GLSL 1.50, fixes Intel on Windows
texture2D() is still available, but not in the geometry stage, so better be consistent everywhere. (cherry-picked from the commit 1a9b62dc661a26c02db34ab5075b4e209a70b196) Change-Id: I86bf1921713bcbf32946190525401bfcc633a69f Reviewed-on: https://gerrit.libreoffice.org/22777 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
-rw-r--r--slideshow/opengl/honeycombFragmentShader.glsl6
-rw-r--r--slideshow/opengl/honeycombGeometryShader.glsl2
-rw-r--r--slideshow/opengl/vortexFragmentShader.glsl6
-rwxr-xr-xslideshow/opengl/vortexVertexShader.glsl2
4 files changed, 8 insertions, 8 deletions
diff --git a/slideshow/opengl/honeycombFragmentShader.glsl b/slideshow/opengl/honeycombFragmentShader.glsl
index 41b6738a804f..c207203a1ce3 100644
--- a/slideshow/opengl/honeycombFragmentShader.glsl
+++ b/slideshow/opengl/honeycombFragmentShader.glsl
@@ -29,7 +29,7 @@ bool isBorder(vec2 point)
void main()
{
- vec4 fragment = vec4(texture2D(slideTexture, texturePosition).rgb, 1.0);
+ vec4 fragment = vec4(texture(slideTexture, texturePosition).rgb, 1.0);
vec3 lightVector = vec3(0.0, 0.0, 1.0);
float light = max(dot(lightVector, normal), 0.0);
if (hexagonSize > 1.0) {
@@ -75,8 +75,8 @@ void main()
}
float visibility = 1.0;
const float epsilon = 0.0001;
- if (texture2D(depthShadowTexture, shadowCoordinate.xy).r < shadowCoordinate.z - epsilon)
- visibility *= 0.7 + 0.3 * (1.0 - texture2D(colorShadowTexture, shadowCoordinate.xy).a);
+ if (texture(depthShadowTexture, shadowCoordinate.xy).r < shadowCoordinate.z - epsilon)
+ visibility *= 0.7 + 0.3 * (1.0 - texture(colorShadowTexture, shadowCoordinate.xy).a);
vec4 black = vec4(0.0, 0.0, 0.0, fragment.a);
if (fragment.a < 0.001)
discard;
diff --git a/slideshow/opengl/honeycombGeometryShader.glsl b/slideshow/opengl/honeycombGeometryShader.glsl
index 5269fad45e1c..5afaa7b95aea 100644
--- a/slideshow/opengl/honeycombGeometryShader.glsl
+++ b/slideshow/opengl/honeycombGeometryShader.glsl
@@ -29,7 +29,7 @@ const float expandFactor = 0.0318;
float snoise(vec2 p)
{
- return texture2D(permTexture, p).r;
+ return texture(permTexture, p).r;
}
mat4 identityMatrix(void)
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);
diff --git a/slideshow/opengl/vortexVertexShader.glsl b/slideshow/opengl/vortexVertexShader.glsl
index 5c6fe23a3f15..8d1a67d3d120 100755
--- a/slideshow/opengl/vortexVertexShader.glsl
+++ b/slideshow/opengl/vortexVertexShader.glsl
@@ -39,7 +39,7 @@ out float endTime;
float snoise(vec2 p)
{
- return texture2D(permTexture, p).r;
+ return texture(permTexture, p).r;
}
mat4 identityMatrix(void)