aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/particles/defaultshaders/spritefragment.shader
blob: 86002f03fb7d70af2c16e92b29ce4867e79107ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
uniform sampler2D texture;
uniform sampler2D colortable;
uniform sampler2D opacitytable;
uniform lowp float qt_Opacity;

varying highp vec2 fTexA;
varying highp vec2 fTexB;
varying lowp float progress;
varying lowp vec4 fColor;
varying lowp float tt;

void main() {
    gl_FragColor = mix(texture2D(texture, fTexA), texture2D(texture, fTexB), progress)
            * fColor
            * texture2D(colortable, vec2(tt, 0.5))
            * (texture2D(opacitytable, vec2(tt, 0.5)).w * qt_Opacity);
}