mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
gl renderer: Properly apply opacity in cross-fade shader
This commit is contained in:
parent
28815bc7e4
commit
34fcfb154a
@ -6,7 +6,8 @@ void main() {
|
||||
vec4 source1 = Texture(u_source, vUv); // start child
|
||||
vec4 source2 = Texture(u_source2, vUv); // end child
|
||||
|
||||
float p = u_progress;
|
||||
vec4 color = ((1.0 - p) * source1) + (p * source2);
|
||||
float p_start = (1.0 - u_progress) * u_alpha;
|
||||
float p_end = u_progress * u_alpha;
|
||||
vec4 color = (p_start * source1) + (p_end * source2);
|
||||
setOutputColor(color);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user