aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/shadereffects/content/shaders/wobble.frag
blob: fedbb682542ce5c2d6aa98796bd8dba611de0054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
uniform lowp float qt_Opacity;
uniform highp float amplitude;
uniform highp float frequency;
uniform highp float time;
uniform sampler2D source;

varying highp vec2 qt_TexCoord0;

void main()
{
    highp vec2 p = sin(time + frequency * qt_TexCoord0);
    gl_FragColor = texture2D(source, qt_TexCoord0 + amplitude * vec2(p.y, -p.x)) * qt_Opacity;
}