From 422dc30dc2017465eab398ebb09d102be331d3c9 Mon Sep 17 00:00:00 2001 From: Thomas Hansen Date: Sun, 15 Jul 2012 12:10:45 -0500 Subject: [PATCH] screenmanager: change shader for fade transition to find bug in issue #570 --- kivy/uix/screenmanager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kivy/uix/screenmanager.py b/kivy/uix/screenmanager.py index e2f11db3e..2de9a7066 100644 --- a/kivy/uix/screenmanager.py +++ b/kivy/uix/screenmanager.py @@ -484,9 +484,10 @@ class FadeTransition(ShaderTransition): uniform sampler2D tex_out; void main(void) { - vec4 cin = texture2D(tex_in, tex_coord0); - vec4 cout = texture2D(tex_out, tex_coord0); - gl_FragColor = mix(cout, cin, t); + vec4 cin = vec4(texture2D(tex_in, tex_coord0.st)); + vec4 cout = vec4(texture2D(tex_out, tex_coord0.st)); + vec4 frag_col = vec4(t*cout) + vec4((1.0-t)*cin); + gl_FragColor = frag_col; } ''' fs = StringProperty(FADE_TRANSITION_FS)