diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-08-28 16:25:20 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-01 12:52:51 +0200 |
commit | 659f238bbbe040cce1bdf900f8f5500845ca8727 (patch) | |
tree | 7990072bf39b2c19df68bcd7615242d08eb8dd2f /examples | |
parent | 80ba1d635dc37963b4c90d776c46774b0349c4f8 (diff) | |
parent | 1dba07b602ef8b3fd9333a8afb1db4cbaf9d824e (diff) | |
download | qtmultimedia-659f238bbbe040cce1bdf900f8f5500845ca8727.tar.gz |
Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts:
src/gsttools/qgstreamervideoinputdevicecontrol.cpp
src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp
src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp
Change-Id: Ic854589562d2deeaa0ebf75840cb8a2ee32e99de
Diffstat (limited to 'examples')
5 files changed, 12 insertions, 4 deletions
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml index 65c019cf9..42af673f5 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml @@ -31,7 +31,8 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.1 +import QtQuick.Window 2.1 Effect { id: root @@ -49,6 +50,7 @@ Effect { property real posX: -1 property real posY: -1 + property real pixDens: Screen.pixelDensity QtObject { id: d diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml index ce301d6d9..c6c60bc29 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml @@ -31,7 +31,8 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.1 +import QtQuick.Window 2.1 Effect { parameters: ListModel { @@ -48,6 +49,7 @@ Effect { // Transform slider values, and bind result to shader uniforms property real amplitude: parameters.get(0).value * 0.03 property real n: parameters.get(1).value * 7 + property real pixDens: Screen.pixelDensity property real time: 0 NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml index ce1987320..58530eb4f 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml @@ -43,7 +43,7 @@ ListModel { ListElement { name: "Emboss"; source: "EffectEmboss.qml" } ListElement { name: "Glow"; source: "EffectGlow.qml" } ListElement { name: "Isolate"; source: "EffectIsolate.qml" } - //ListElement { name: "Magnify"; source: "EffectMagnify.qml" } + ListElement { name: "Magnify"; source: "EffectMagnify.qml" } ListElement { name: "Page curl"; source: "EffectPageCurl.qml" } ListElement { name: "Pixelate"; source: "EffectPixelate.qml" } ListElement { name: "Posterize"; source: "EffectPosterize.qml" } 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; 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; |