aboutsummaryrefslogtreecommitdiff
path: root/examples/resources/shaders/glsl330/base.vs
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-04-07 12:32:32 +0200
committerraysan5 <raysan5@gmail.com>2016-04-07 12:32:32 +0200
commit1d545449bb19148b45d2d92f213e1001a8eb527c (patch)
tree3e9627f74717b957521202fb17c316e936301bbb /examples/resources/shaders/glsl330/base.vs
parent78b502b0bf1ee796d86837c611150ed5f8d58fd2 (diff)
downloadraylib-1d545449bb19148b45d2d92f213e1001a8eb527c.tar.gz
raylib-1d545449bb19148b45d2d92f213e1001a8eb527c.zip
Reviewed shaders and added comments
Diffstat (limited to 'examples/resources/shaders/glsl330/base.vs')
-rw-r--r--examples/resources/shaders/glsl330/base.vs26
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/resources/shaders/glsl330/base.vs b/examples/resources/shaders/glsl330/base.vs
new file mode 100644
index 00000000..638cb8ae
--- /dev/null
+++ b/examples/resources/shaders/glsl330/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