diff options
author | Niels Weber <niels.weber@digia.com> | 2014-05-05 16:16:05 +0200 |
---|---|---|
committer | Niels Weber <niels.weber@digia.com> | 2014-08-18 14:05:22 +0200 |
commit | da77331952f38992fbd4a650a02ad975a4efaa36 (patch) | |
tree | 552b7fd7b828862e8a108428eb5f45425059ebfd /examples/multimedia/video/qmlvideofx/shaders/magnify.fsh | |
parent | f31e186354b11995d4bd4f0ad3c070c638f47648 (diff) |
Improve Magnify and Ripple effects on video shader example
Re-enable Magnify shader.
Use correct coordinates for Magnify and Ripple shader.
Task-number: QTBUG-38121
Change-Id: Ie8d962ba841d074c9ebcf3b86f948848ad6a1812
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'examples/multimedia/video/qmlvideofx/shaders/magnify.fsh')
-rw-r--r-- | examples/multimedia/video/qmlvideofx/shaders/magnify.fsh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/multimedia/video/qmlvideofx/shaders/magnify.fsh b/examples/multimedia/video/qmlvideofx/shaders/magnify.fsh index 0387d25d6..fb7e2a047 100644 --- a/examples/multimedia/video/qmlvideofx/shaders/magnify.fsh +++ b/examples/multimedia/video/qmlvideofx/shaders/magnify.fsh @@ -50,12 +50,15 @@ uniform float targetWidth; uniform float targetHeight; uniform float posX; uniform float posY; +uniform float pixDens; void main() { vec2 tc = qt_TexCoord0; vec2 center = vec2(posX, posY); vec2 xy = gl_FragCoord.xy - center.xy; + xy.x -= (pixDens * 14.0); + xy.y -= (pixDens * 29.0); float r = sqrt(xy.x * xy.x + xy.y * xy.y); if (r < radius) { float h = diffractionIndex * 0.5 * radius; |