[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - slideshow/opengl

Emmanuel Gil Peyrot emmanuel.peyrot at collabora.com
Thu Jan 21 00:33:45 PST 2016


 slideshow/opengl/glitterVertexShader.glsl     |    4 ++--
 slideshow/opengl/honeycombFragmentShader.glsl |    6 ++++--
 slideshow/opengl/honeycombVertexShader.glsl   |    2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 76f7533d1bfd49179774a4a0948061b2b2c7939e
Author: Emmanuel Gil Peyrot <emmanuel.peyrot at collabora.com>
Date:   Wed Jan 13 23:18:32 2016 +0000

    slideshow: Tweak a few constants to make Glitter and Honeycomb look nicer
    
    Change-Id: I5dd15f3d483caaedbf58a7ad12bf24798694524f
    (cherry picked from commit 0fe5a3069b83d6a5e83c6c4df5d874c8802b7f52)
    Reviewed-on: https://gerrit.libreoffice.org/21644
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/slideshow/opengl/glitterVertexShader.glsl b/slideshow/opengl/glitterVertexShader.glsl
index 3704efd..00ae568 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 607e83d..25b3e2d 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 b54efbd..d54783b 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;


More information about the Libreoffice-commits mailing list