summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/gltf/basic.vert
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qt3d/gltf/basic.vert')
-rw-r--r--examples/qt3d/gltf/basic.vert18
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/qt3d/gltf/basic.vert b/examples/qt3d/gltf/basic.vert
new file mode 100644
index 000000000..0e35affd5
--- /dev/null
+++ b/examples/qt3d/gltf/basic.vert
@@ -0,0 +1,18 @@
+#version 330
+
+in vec3 vertexPosition;
+in vec3 vertexColor;
+
+uniform mat4 u_projection;
+uniform mat4 u_model;
+
+out vec3 color;
+
+void main()
+{
+ // Pass through the color to the fragment shader
+ color = vertexColor;
+
+ // Calculate the vertex position
+ gl_Position = u_projection * u_model * vec4( vertexPosition, 1.0 );
+}