summaryrefslogtreecommitdiffstats
path: root/tests/manual/render-qml-to-texture/shaders/es2/texturing.vert
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/render-qml-to-texture/shaders/es2/texturing.vert')
-rw-r--r--tests/manual/render-qml-to-texture/shaders/es2/texturing.vert26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/manual/render-qml-to-texture/shaders/es2/texturing.vert b/tests/manual/render-qml-to-texture/shaders/es2/texturing.vert
new file mode 100644
index 000000000..cfbd338d2
--- /dev/null
+++ b/tests/manual/render-qml-to-texture/shaders/es2/texturing.vert
@@ -0,0 +1,26 @@
+
+
+attribute vec3 vertexPosition;
+attribute vec3 vertexNormal;
+attribute vec2 vertexTexCoord;
+
+varying vec3 worldPosition;
+varying vec3 worldNormal;
+varying vec2 texCoord;
+
+uniform mat4 modelMatrix;
+uniform mat3 modelNormalMatrix;
+uniform mat4 mvp;
+
+uniform vec2 texCoordScale;
+uniform vec2 texCoordBias;
+
+void main()
+{
+ texCoord = vertexTexCoord * texCoordScale + texCoordBias;
+ worldNormal = normalize(modelNormalMatrix * vertexNormal);
+ worldPosition = vec3(modelMatrix * vec4(vertexPosition, 1.0));
+
+ gl_Position = mvp * vec4(vertexPosition, 1.0);
+}
+