aboutsummaryrefslogtreecommitdiff
path: root/engine/src/core-data/Common/MatDefs/Misc/Unshaded.vert
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/core-data/Common/MatDefs/Misc/Unshaded.vert')
-rw-r--r--engine/src/core-data/Common/MatDefs/Misc/Unshaded.vert37
1 files changed, 37 insertions, 0 deletions
diff --git a/engine/src/core-data/Common/MatDefs/Misc/Unshaded.vert b/engine/src/core-data/Common/MatDefs/Misc/Unshaded.vert
new file mode 100644
index 0000000..7bf9f7e
--- /dev/null
+++ b/engine/src/core-data/Common/MatDefs/Misc/Unshaded.vert
@@ -0,0 +1,37 @@
+uniform mat4 g_WorldViewProjectionMatrix;
+attribute vec3 inPosition;
+
+#if defined(HAS_COLORMAP) || (defined(HAS_LIGHTMAP) && !defined(SEPARATE_TEXCOORD))
+ #define NEED_TEXCOORD1
+#endif
+
+#ifdef NEED_TEXCOORD1
+ attribute vec2 inTexCoord;
+ varying vec2 texCoord1;
+#endif
+
+#ifdef SEPARATE_TEXCOORD
+ attribute vec2 inTexCoord2;
+ varying vec2 texCoord2;
+#endif
+
+#ifdef HAS_VERTEXCOLOR
+ attribute vec4 inColor;
+ varying vec4 vertColor;
+#endif
+
+void main(){
+ #ifdef NEED_TEXCOORD1
+ texCoord1 = inTexCoord;
+ #endif
+
+ #ifdef SEPARATE_TEXCOORD
+ texCoord2 = inTexCoord2;
+ #endif
+
+ #ifdef HAS_VERTEXCOLOR
+ vertColor = inColor;
+ #endif
+
+ gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0);
+} \ No newline at end of file