summaryrefslogtreecommitdiff
path: root/gfx/gl/shaders/basicShader.vs
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shaders/basicShader.vs')
-rw-r--r--gfx/gl/shaders/basicShader.vs18
1 files changed, 18 insertions, 0 deletions
diff --git a/gfx/gl/shaders/basicShader.vs b/gfx/gl/shaders/basicShader.vs
new file mode 100644
index 0000000..e673548
--- /dev/null
+++ b/gfx/gl/shaders/basicShader.vs
@@ -0,0 +1,18 @@
+#version 120
+
+attribute vec3 position;
+attribute vec2 texCoord;
+attribute vec3 normal;
+
+varying vec2 texCoord0;
+varying vec3 normal0;
+
+uniform mat4 MVP;
+uniform mat4 Normal;
+
+void main()
+{
+ gl_Position = MVP * vec4(position, 1.0);
+ texCoord0 = texCoord;
+ normal0 = (Normal * vec4(normal, 0.0)).xyz;
+}