summaryrefslogtreecommitdiff
path: root/slideshow/opengl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-05-07 17:46:01 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-05-08 17:37:26 +0200
commite3d7fdff5ce3089b24b755063da95a3462b0fc30 (patch)
treee15fc59e9af4439a6f22acea1401cc687c4b3237 /slideshow/opengl
parent320cba92847242cfaf34966c3fc32c4e76d45f03 (diff)
implement PowerPoint 'flash' slide transition (API CHANGE)
It's like 'fade', but using white instead of black. It's a separate type in the pptx file (although I actually cannot find it in the spec OOXML, but PowerPoint 2013 generates it). The API change in XTransitionFactory should be fine, I doubt there's anything external using it. Change-Id: I3479840f265ed8227b3b8301ecff56a63d57f493 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93668 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'slideshow/opengl')
-rw-r--r--slideshow/opengl/fadeBlackFragmentShader.glsl8
1 files changed, 6 insertions, 2 deletions
diff --git a/slideshow/opengl/fadeBlackFragmentShader.glsl b/slideshow/opengl/fadeBlackFragmentShader.glsl
index d45a736c8065..3d618a3b4b91 100644
--- a/slideshow/opengl/fadeBlackFragmentShader.glsl
+++ b/slideshow/opengl/fadeBlackFragmentShader.glsl
@@ -15,7 +15,11 @@ uniform float time;
varying vec2 v_texturePosition;
void main() {
- vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
+#ifdef use_white
+ vec4 color = vec4(1.0, 1.0, 1.0, 1.0);
+#else
+ vec4 color = vec4(0.0, 0.0, 0.0, 1.0);
+#endif
vec4 texel;
float amount;
if (time < 0.5) {
@@ -25,7 +29,7 @@ void main() {
texel = texture2D(enteringSlideTexture, v_texturePosition);
amount = (1.0 - time) * 2;
}
- gl_FragColor = mix(texel, black, amount);
+ gl_FragColor = mix(texel, color, amount);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */