aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/scenegraph_lancelot/data/shaders/gridmesh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/scenegraph_lancelot/data/shaders/gridmesh')
-rw-r--r--tests/manual/scenegraph_lancelot/data/shaders/gridmesh/attributes.qml65
-rw-r--r--tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_1.qml17
-rw-r--r--tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_16.qml17
-rw-r--r--tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_2.qml19
-rw-r--r--tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_4.qml17
-rw-r--r--tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_8.qml17
6 files changed, 16 insertions, 136 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/attributes.qml b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/attributes.qml
deleted file mode 100644
index 17d9aadf95..0000000000
--- a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/attributes.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-import QtQuick 2.0
-
-Rectangle {
- width: 320
- height: 480
-
- Text {
- id: text
- font.pixelSize: 80
- text: "Shaderz!"
- }
-
- ShaderEffectSource {
- id: source
- sourceItem: text
- hideSource: true
- smooth: true
- }
- Column {
- ShaderEffect {
- width: 320
- height: 160
- property variant source: source
- vertexShader: "
- uniform highp mat4 qt_Matrix;
- attribute highp vec4 qt_Vertex;
- attribute highp vec2 qt_MultiTexCoord0;
- varying highp vec2 qt_TexCoord0;
- void main() {
- gl_Position = qt_Matrix * qt_Vertex;
- qt_TexCoord0 = qt_MultiTexCoord0;
- }"
- }
- ShaderEffect {
- width: 320
- height: 160
- property variant source: source
- vertexShader: "
- attribute highp vec2 qt_MultiTexCoord0;
- uniform highp mat4 qt_Matrix;
- attribute highp vec4 qt_Vertex;
- varying highp vec2 qt_TexCoord0;
- void main() {
- gl_Position = qt_Matrix * qt_Vertex;
- qt_TexCoord0 = qt_MultiTexCoord0;
- }"
- }
- ShaderEffect {
- width: 320
- height: 160
- property variant source: source
- vertexShader: "
- attribute highp vec2 qt_MultiTexCoord0;
- uniform highp mat4 qt_Matrix;
- attribute highp vec4 qt_Vertex;
- varying highp vec2 qt_TexCoord0;
- uniform highp float width;
- uniform highp float height;
- void main() {
- gl_Position = qt_Matrix * qt_Vertex;
- qt_TexCoord0 = qt_Vertex.xy / vec2(width, height);
- }"
- }
- }
-}
diff --git a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_1.qml b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_1.qml
index ddea979124..7a743453ab 100644
--- a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_1.qml
+++ b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_1.qml
@@ -6,8 +6,8 @@ Rectangle {
color: "skyblue"
ShaderEffect {
anchors.centerIn: parent
- width: 16 * 16
- height: 24 * 16
+ width: 22 * 12
+ height: 16 * 12
property variant source: ShaderEffectSource {
sourceItem: Rectangle {
width: 22 * 20
@@ -40,18 +40,7 @@ Rectangle {
}
smooth: true
}
- vertexShader: "
- uniform highp mat4 qt_Matrix;
- attribute highp vec4 qt_Vertex;
- attribute highp vec2 qt_MultiTexCoord0;
- varying highp vec2 qt_TexCoord0;
- void main() {
- highp vec4 pos = qt_Vertex;
- pos.x += sin(qt_Vertex.y * 0.02) * 20.;
- pos.y += sin(qt_Vertex.x * 0.02) * 20.;
- gl_Position = qt_Matrix * pos;
- qt_TexCoord0 = qt_MultiTexCoord0;
- }"
+ vertexShader: "qrc:shaders/wave.vert"
mesh: GridMesh {
property int r: 1
resolution: Qt.size(r, r)
diff --git a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_16.qml b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_16.qml
index 971cda4f55..9e221d0887 100644
--- a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_16.qml
+++ b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_16.qml
@@ -6,8 +6,8 @@ Rectangle {
color: "skyblue"
ShaderEffect {
anchors.centerIn: parent
- width: 16 * 16
- height: 24 * 16
+ width: 22 * 12
+ height: 16 * 12
property variant source: ShaderEffectSource {
sourceItem: Rectangle {
width: 22 * 20
@@ -40,18 +40,7 @@ Rectangle {
}
smooth: true
}
- vertexShader: "
- uniform highp mat4 qt_Matrix;
- attribute highp vec4 qt_Vertex;
- attribute highp vec2 qt_MultiTexCoord0;
- varying highp vec2 qt_TexCoord0;
- void main() {
- highp vec4 pos = qt_Vertex;
- pos.x += sin(qt_Vertex.y * 0.02) * 20.;
- pos.y += sin(qt_Vertex.x * 0.02) * 20.;
- gl_Position = qt_Matrix * pos;
- qt_TexCoord0 = qt_MultiTexCoord0;
- }"
+ vertexShader: "qrc:shaders/wave.vert"
mesh: GridMesh {
property int r: 16
resolution: Qt.size(r, r)
diff --git a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_2.qml b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_2.qml
index d301ef089c..4dad42d182 100644
--- a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_2.qml
+++ b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_2.qml
@@ -4,10 +4,10 @@ Rectangle {
width: 320
height: 480
color: "skyblue"
- ShaderEffect{
+ ShaderEffect {
anchors.centerIn: parent
- width: 16 * 16
- height: 24 * 16
+ width: 22 * 12
+ height: 16 * 12
property variant source: ShaderEffectSource {
sourceItem: Rectangle {
width: 22 * 20
@@ -40,18 +40,7 @@ Rectangle {
}
smooth: true
}
- vertexShader: "
- uniform highp mat4 qt_Matrix;
- attribute highp vec4 qt_Vertex;
- attribute highp vec2 qt_MultiTexCoord0;
- varying highp vec2 qt_TexCoord0;
- void main() {
- highp vec4 pos = qt_Vertex;
- pos.x += sin(qt_Vertex.y * 0.02) * 20.;
- pos.y += sin(qt_Vertex.x * 0.02) * 20.;
- gl_Position = qt_Matrix * pos;
- qt_TexCoord0 = qt_MultiTexCoord0;
- }"
+ vertexShader: "qrc:shaders/wave.vert"
mesh: GridMesh {
property int r: 2
resolution: Qt.size(r, r)
diff --git a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_4.qml b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_4.qml
index 0043282efd..9d91da0bb2 100644
--- a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_4.qml
+++ b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_4.qml
@@ -6,8 +6,8 @@ Rectangle {
color: "skyblue"
ShaderEffect {
anchors.centerIn: parent
- width: 16 * 16
- height: 24 * 16
+ width: 22 * 12
+ height: 16 * 12
property variant source: ShaderEffectSource {
sourceItem: Rectangle {
width: 22 * 20
@@ -40,18 +40,7 @@ Rectangle {
}
smooth: true
}
- vertexShader: "
- uniform highp mat4 qt_Matrix;
- attribute highp vec4 qt_Vertex;
- attribute highp vec2 qt_MultiTexCoord0;
- varying highp vec2 qt_TexCoord0;
- void main() {
- highp vec4 pos = qt_Vertex;
- pos.x += sin(qt_Vertex.y * 0.02) * 20.;
- pos.y += sin(qt_Vertex.x * 0.02) * 20.;
- gl_Position = qt_Matrix * pos;
- qt_TexCoord0 = qt_MultiTexCoord0;
- }"
+ vertexShader: "qrc:shaders/wave.vert"
mesh: GridMesh {
property int r: 4
resolution: Qt.size(r, r)
diff --git a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_8.qml b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_8.qml
index f9427a1f16..c436c0f8e4 100644
--- a/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_8.qml
+++ b/tests/manual/scenegraph_lancelot/data/shaders/gridmesh/resolution_8.qml
@@ -6,8 +6,8 @@ Rectangle {
color: "skyblue"
ShaderEffect {
anchors.centerIn: parent
- width: 16 * 16
- height: 24 * 16
+ width: 22 * 12
+ height: 16 * 12
property variant source: ShaderEffectSource {
sourceItem: Rectangle {
width: 22 * 20
@@ -40,18 +40,7 @@ Rectangle {
}
smooth: true
}
- vertexShader: "
- uniform highp mat4 qt_Matrix;
- attribute highp vec4 qt_Vertex;
- attribute highp vec2 qt_MultiTexCoord0;
- varying highp vec2 qt_TexCoord0;
- void main() {
- highp vec4 pos = qt_Vertex;
- pos.x += sin(qt_Vertex.y * 0.02) * 20.;
- pos.y += sin(qt_Vertex.x * 0.02) * 20.;
- gl_Position = qt_Matrix * pos;
- qt_TexCoord0 = qt_MultiTexCoord0;
- }"
+ vertexShader: "qrc:shaders/wave.vert"
mesh: GridMesh {
property int r: 8
resolution: Qt.size(r, r)