summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/qmlvideofx/shaders/magnify.fsh
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@digia.com>2014-09-01 14:19:53 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-09-01 14:19:53 +0200
commitbc1fa076c944c6af3250cb7210190da42a4de6ea (patch)
treeb6948fa95abbdd4ffbb30b76c7d3c09ae07e51db /examples/multimedia/video/qmlvideofx/shaders/magnify.fsh
parent0c3438c9a12fbc607eada8f938cf0ad8fdea374d (diff)
parent659f238bbbe040cce1bdf900f8f5500845ca8727 (diff)
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4v5.4.0-alpha1
Diffstat (limited to 'examples/multimedia/video/qmlvideofx/shaders/magnify.fsh')
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/magnify.fsh3
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;