summaryrefslogtreecommitdiff
path: root/slideshow/opengl
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>2016-01-13 23:18:32 +0000
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-01-16 20:52:29 +0100
commit0fe5a3069b83d6a5e83c6c4df5d874c8802b7f52 (patch)
treeccd75955b3532e85c46b06d20873ebf33cca78bb /slideshow/opengl
parente830c7f7c0e77842090e0424dc3711d54285d5d4 (diff)
slideshow: Tweak a few constants to make Glitter and Honeycomb look nicer
Change-Id: I5dd15f3d483caaedbf58a7ad12bf24798694524f
Diffstat (limited to 'slideshow/opengl')
-rw-r--r--slideshow/opengl/glitterVertexShader.glsl4
-rw-r--r--slideshow/opengl/honeycombFragmentShader.glsl6
-rw-r--r--slideshow/opengl/honeycombVertexShader.glsl2
3 files changed, 7 insertions, 5 deletions
diff --git a/slideshow/opengl/glitterVertexShader.glsl b/slideshow/opengl/glitterVertexShader.glsl
index 3704efdab90e..00ae568ac672 100644
--- a/slideshow/opengl/glitterVertexShader.glsl
+++ b/slideshow/opengl/glitterVertexShader.glsl
@@ -111,9 +111,9 @@ void main( void )
// Scale the transition time to minimize the time a tile will stay black.
float transitionTime = clamp((time - startTime) / (endTime - startTime), 0.0, 1.0);
if (transitionTime < 0.5)
- transitionTime = transitionTime * 0.3 / 0.5;
+ transitionTime = transitionTime / 2.0;
else
- transitionTime = (transitionTime * 0.3 / 0.5) + 0.4;
+ transitionTime = (transitionTime / 2.0) + 0.5;
angle = transitionTime * M_PI * 2.0;
mat4 modelViewMatrix = u_modelViewMatrix * u_operationsTransformMatrix * u_sceneTransformMatrix * u_primitiveTransformMatrix;
diff --git a/slideshow/opengl/honeycombFragmentShader.glsl b/slideshow/opengl/honeycombFragmentShader.glsl
index 607e83d55a1c..25b3e2d02a1c 100644
--- a/slideshow/opengl/honeycombFragmentShader.glsl
+++ b/slideshow/opengl/honeycombFragmentShader.glsl
@@ -43,7 +43,7 @@ void main()
// If the center is “outside” of the canvas, clear it first.
startTime = 0.15;
else
- startTime = 0.15 + fuzz * 0.3;
+ startTime = 0.15 + fuzz * 0.4;
float endTime = startTime + 0.05;
actualTime = 1.0 - clamp((time - startTime) / (endTime - startTime), 0, 1);
} else {
@@ -52,9 +52,11 @@ void main()
// If the center is “outside” of the canvas, clear it first.
startTime = 0.85;
else
- startTime = 0.5 + fuzz * 0.3;
+ startTime = 0.3 + fuzz * 0.4;
float endTime = startTime + 0.05;
actualTime = clamp((time - startTime) / (endTime - startTime), 0, 1);
+ if (time < 0.8)
+ actualTime *= time / 0.8;
}
gl_FragColor.a = actualTime;
}
diff --git a/slideshow/opengl/honeycombVertexShader.glsl b/slideshow/opengl/honeycombVertexShader.glsl
index b54efbdb6ccf..d54783b82b7b 100644
--- a/slideshow/opengl/honeycombVertexShader.glsl
+++ b/slideshow/opengl/honeycombVertexShader.glsl
@@ -73,7 +73,7 @@ void main( void )
// Entering texture
transformMatrix = translationMatrix(vec3(0, 0, 28 * (sqrt(time) - 1)))
* slideScaleMatrix
- * rotationMatrix(vec3(0.0, 0.0, 1.0), pow(time - 1, 2) * M_PI)
+ * rotationMatrix(vec3(0.0, 0.0, 1.0), pow(0.8 * (time - 1.0), 2.0) * M_PI)
* invertSlideScaleMatrix;
}
modelViewProjectionMatrix = u_projectionMatrix * modelViewMatrix * transformMatrix;