From da77331952f38992fbd4a650a02ad975a4efaa36 Mon Sep 17 00:00:00 2001 From: Niels Weber Date: Mon, 5 May 2014 16:16:05 +0200 Subject: Improve Magnify and Ripple effects on video shader example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-enable Magnify shader. Use correct coordinates for Magnify and Ripple shader. Task-number: QTBUG-38121 Change-Id: Ie8d962ba841d074c9ebcf3b86f948848ad6a1812 Reviewed-by: Topi Reiniƶ --- examples/multimedia/video/qmlvideofx/shaders/ripple.fsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/multimedia/video/qmlvideofx/shaders/ripple.fsh') diff --git a/examples/multimedia/video/qmlvideofx/shaders/ripple.fsh b/examples/multimedia/video/qmlvideofx/shaders/ripple.fsh index b70f36d92..428c041c7 100644 --- a/examples/multimedia/video/qmlvideofx/shaders/ripple.fsh +++ b/examples/multimedia/video/qmlvideofx/shaders/ripple.fsh @@ -55,12 +55,13 @@ const int ITER = 7; const float RATE = 0.1; uniform float amplitude; uniform float n; +uniform float pixDens; void main() { vec2 uv = qt_TexCoord0.xy; vec2 tc = uv; - vec2 p = vec2(-1.0 + 2.0 * gl_FragCoord.x / targetWidth, -(-1.0 + 2.0 * gl_FragCoord.y / targetHeight)); + vec2 p = vec2(-1.0 + 2.0 * (gl_FragCoord.x - (pixDens * 14.0)) / targetWidth, -(-1.0 + 2.0 * (gl_FragCoord.y - (pixDens * 29.0)) / targetHeight)); float diffx = 0.0; float diffy = 0.0; vec4 col; -- cgit v1.2.3