Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import QtQuick 2.0
Row {
Image {
id: image
width: 200
height: 200
source: "usagi-logo.png"
ShaderEffect {
width: 300
height: 300
property var source: image
property real frequency: 20
property real amplitude: 0.05
varying highp vec2 qt_TexCoord0;
uniform sampler2D source;
uniform lowp float qt_Opacity;
uniform highp float frequency;
uniform highp float amplitude;
void main() {
highp vec2 p = sin(frequency * qt_TexCoord0);
gl_FragColor = texture2D(source, qt_TexCoord0
+ amplitude * vec2(p.x, -p.y)) * qt_Opacity;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment