summaryrefslogtreecommitdiffstats
path: root/demos/declarative/shadereffects/shader-demo.qml
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/shadereffects/shader-demo.qml')
-rw-r--r--demos/declarative/shadereffects/shader-demo.qml53
1 files changed, 47 insertions, 6 deletions
diff --git a/demos/declarative/shadereffects/shader-demo.qml b/demos/declarative/shadereffects/shader-demo.qml
index b97aace682..1226064a5d 100644
--- a/demos/declarative/shadereffects/shader-demo.qml
+++ b/demos/declarative/shadereffects/shader-demo.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Declarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import QtQuick 2.0
Image {
@@ -73,7 +114,7 @@ Image {
"uniform highp float amplitude;" +
"uniform highp float frequency;" +
"uniform highp float time;" +
- "uniform lowp sampler2D source;" +
+ "uniform sampler2D source;" +
"varying highp vec2 qt_TexCoord0;" +
"void main() {" +
" highp vec2 p = sin(time + frequency * qt_TexCoord0);" +
@@ -105,7 +146,7 @@ Image {
property variant delta: Qt.size(1.0 / width, 0.0)
property variant source: theSource
fragmentShader: "
- uniform lowp sampler2D source;
+ uniform sampler2D source;
uniform highp vec2 delta;
varying highp vec2 qt_TexCoord0;
void main() {
@@ -118,7 +159,7 @@ Image {
}
}
fragmentShader: "
- uniform lowp sampler2D source;
+ uniform sampler2D source;
uniform highp vec2 delta;
varying highp vec2 qt_TexCoord0;
void main() {
@@ -161,7 +202,7 @@ Image {
property variant source: theSource
property variant delta: Qt.size(0.5 / width, 0.5 / height)
fragmentShader: "
- uniform lowp sampler2D source;
+ uniform sampler2D source;
uniform highp vec2 delta;
uniform highp float qt_Opacity;
varying highp vec2 qt_TexCoord0;
@@ -182,7 +223,7 @@ Image {
property variant source: theSource
property color tint: sliderToColor(colorizeSlider.value)
fragmentShader: "
- uniform lowp sampler2D source;
+ uniform sampler2D source;
uniform lowp vec4 tint;
uniform lowp float qt_Opacity;
varying highp vec2 qt_TexCoord0;
@@ -203,7 +244,7 @@ Image {
ShaderEffectItem {
width: 180
height: 180
- meshResolution: Qt.size(10, 10)
+ mesh: GridMesh { resolution: Qt.size(10, 10) }
property variant source: theSource
property real bend: 0
property real minimize: 0