diff options
Diffstat (limited to 'tests/manual/nodetypes_ng/wobble.frag')
-rw-r--r-- | tests/manual/nodetypes_ng/wobble.frag | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/manual/nodetypes_ng/wobble.frag b/tests/manual/nodetypes_ng/wobble.frag new file mode 100644 index 0000000000..a34481c2f2 --- /dev/null +++ b/tests/manual/nodetypes_ng/wobble.frag @@ -0,0 +1,20 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D source; + +layout(std140, binding = 0) uniform buf { + mat4 qt_Matrix; + float qt_Opacity; + float amplitude; + float frequency; + float time; +} ubuf; + +void main() +{ + vec2 p = sin(ubuf.time + ubuf.frequency * qt_TexCoord0); + fragColor = texture(source, qt_TexCoord0 + ubuf.amplitude * vec2(p.y, -p.x)) * ubuf.qt_Opacity; +} |