summaryrefslogtreecommitdiffhomepage
path: root/shaders/glsl100/base.vs
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/glsl100/base.vs')
-rw-r--r--shaders/glsl100/base.vs14
1 files changed, 10 insertions, 4 deletions
diff --git a/shaders/glsl100/base.vs b/shaders/glsl100/base.vs
index 9f339382..e9386939 100644
--- a/shaders/glsl100/base.vs
+++ b/shaders/glsl100/base.vs
@@ -1,20 +1,26 @@
#version 100
+// Input vertex attributes
attribute vec3 vertexPosition;
attribute vec2 vertexTexCoord;
attribute vec3 vertexNormal;
+attribute vec4 vertexColor;
-varying vec2 fragTexCoord;
-
+// Input uniform values
uniform mat4 mvpMatrix;
+// Output vertex attributes (to fragment shader)
+varying vec2 fragTexCoord;
+varying vec4 fragColor;
+
// NOTE: Add here your custom variables
void main()
{
- vec3 normal = vertexNormal;
-
+ // 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