Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/core/fadingmaterial_core.frag
1 | #version 150 core | 1 | #version 150 core | ||
---|---|---|---|---|---|
2 | in highp vec2 v_coord; | 2 | in highp vec2 v_coord; | ||
3 | out vec4 fragColor; | ||||
3 | uniform sampler2D u_src; | 4 | uniform sampler2D u_src; | ||
4 | uniform sampler2D u_target; | 5 | uniform sampler2D u_target; | ||
5 | uniform highp float u_transitionProgress; | 6 | uniform highp float u_transitionProgress; | ||
6 | uniform lowp float qt_Opacity; | 7 | uniform lowp float qt_Opacity; | ||
7 | void main() { | 8 | void main() { | ||
8 | lowp vec4 tex1 = texture2D(u_target, v_coord); | 9 | lowp vec4 tex1 = texture2D(u_target, v_coord); | ||
9 | lowp vec4 tex2 = texture2D(u_src, v_coord); | 10 | lowp vec4 tex2 = texture2D(u_src, v_coord); | ||
10 | gl_FragColor = mix(tex2, tex1, u_transitionProgress) * qt_Opacity; | 11 | fragColor = mix(tex2, tex1, u_transitionProgress) * qt_Opacity; | ||
11 | } | 12 | } |