|
@@ -0,0 +1,31 @@
|
|
|
+#version 100
|
|
|
+
|
|
|
+// Input vertex attributes
|
|
|
+attribute vec3 vertexPosition;
|
|
|
+attribute vec2 vertexTexCoord;
|
|
|
+attribute vec2 vertexTexCoord2;
|
|
|
+attribute vec4 vertexColor;
|
|
|
+
|
|
|
+// Input uniform values
|
|
|
+uniform mat4 mvp;
|
|
|
+uniform mat4 matModel;
|
|
|
+
|
|
|
+// Output vertex attributes (to fragment shader)
|
|
|
+varying vec3 fragPosition;
|
|
|
+varying vec2 fragTexCoord;
|
|
|
+varying vec2 fragTexCoord2;
|
|
|
+varying vec4 fragColor;
|
|
|
+
|
|
|
+// NOTE: Add here your custom variables
|
|
|
+
|
|
|
+void main()
|
|
|
+{
|
|
|
+ // Send vertex attributes to fragment shader
|
|
|
+ fragPosition = vec3(matModel*vec4(vertexPosition, 1.0));
|
|
|
+ fragTexCoord = vertexTexCoord;
|
|
|
+ fragTexCoord2 = vertexTexCoord2;
|
|
|
+ fragColor = vertexColor;
|
|
|
+
|
|
|
+ // Calculate final vertex position
|
|
|
+ gl_Position = mvp*vec4(vertexPosition, 1.0);
|
|
|
+}
|