diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-16 18:09:15 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-16 18:09:15 +0000 |
commit | 400410fcd436d5e4310bfa779f0309c5fae5b2c2 (patch) | |
tree | 89661918c487e63b6c71f2e9281b553928010606 /res/basicShader.vs | |
download | ilt-400410fcd436d5e4310bfa779f0309c5fae5b2c2.tar.bz2 ilt-400410fcd436d5e4310bfa779f0309c5fae5b2c2.tar.xz ilt-400410fcd436d5e4310bfa779f0309c5fae5b2c2.zip |
Initial commit
Stripped back and formatted from https://github.com/BennyQBD/ModernOpenGLTutorial/
Diffstat (limited to 'res/basicShader.vs')
-rw-r--r-- | res/basicShader.vs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/res/basicShader.vs b/res/basicShader.vs new file mode 100644 index 0000000..e673548 --- /dev/null +++ b/res/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;
+}
|