summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/scene01_fs_colorfultest.glsl5
-rw-r--r--res/scene01_vs_basic.glsl12
2 files changed, 17 insertions, 0 deletions
diff --git a/res/scene01_fs_colorfultest.glsl b/res/scene01_fs_colorfultest.glsl
new file mode 100644
index 0000000..15e33a1
--- /dev/null
+++ b/res/scene01_fs_colorfultest.glsl
@@ -0,0 +1,5 @@
+#version 330 core
+out vec3 color;
+void main(){
+ color = vec3(1,0,0);
+}
diff --git a/res/scene01_vs_basic.glsl b/res/scene01_vs_basic.glsl
new file mode 100644
index 0000000..6f7c56f
--- /dev/null
+++ b/res/scene01_vs_basic.glsl
@@ -0,0 +1,12 @@
+#version 330 core
+
+// Input vertex data, different for all executions of this shader.
+layout(location = 0) in vec3 vertexPosition_modelspace;
+
+// Values that stay constant for the whole mesh.
+uniform mat4 MVP;
+
+void main(){
+ // Output position of the vertex, in clip space : MVP * position
+ gl_Position = MVP * vec4(vertexPosition_modelspace,1);
+}