aboutsummaryrefslogtreecommitdiff
path: root/examples/oculus_glfw_sample/base.vs
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-06-08 13:29:56 +0200
committerraysan5 <raysan5@gmail.com>2016-06-08 13:29:56 +0200
commitb79ede4edb522b0cc5e458c49cb45d49ec902758 (patch)
tree310a227513c2880ebd2292efd6d982027b02ccc8 /examples/oculus_glfw_sample/base.vs
parent70a96fff80d0fb42722788df268b0c8e77e97120 (diff)
downloadraylib-b79ede4edb522b0cc5e458c49cb45d49ec902758.tar.gz
raylib-b79ede4edb522b0cc5e458c49cb45d49ec902758.zip
Added distortion shader to render
Diffstat (limited to 'examples/oculus_glfw_sample/base.vs')
-rw-r--r--examples/oculus_glfw_sample/base.vs26
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/oculus_glfw_sample/base.vs b/examples/oculus_glfw_sample/base.vs
new file mode 100644
index 00000000..638cb8ae
--- /dev/null
+++ b/examples/oculus_glfw_sample/base.vs
@@ -0,0 +1,26 @@
+#version 330
+
+// Input vertex attributes
+in vec3 vertexPosition;
+in vec2 vertexTexCoord;
+in vec3 vertexNormal;
+in vec4 vertexColor;
+
+// Input uniform values
+uniform mat4 mvpMatrix;
+
+// Output vertex attributes (to fragment shader)
+out vec2 fragTexCoord;
+out vec4 fragColor;
+
+// NOTE: Add here your custom variables
+
+void main()
+{
+ // Send vertex attributes to fragment shader
+ fragTexCoord = vertexTexCoord;
+ fragColor = vertexColor;
+
+ // Calculate final vertex position
+ gl_Position = mvpMatrix*vec4(vertexPosition, 1.0);
+} \ No newline at end of file