summaryrefslogtreecommitdiff
path: root/example/vertexshader.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'example/vertexshader.glsl')
-rw-r--r--example/vertexshader.glsl10
1 files changed, 8 insertions, 2 deletions
diff --git a/example/vertexshader.glsl b/example/vertexshader.glsl
index 4187969..f60ec9f 100644
--- a/example/vertexshader.glsl
+++ b/example/vertexshader.glsl
@@ -2,9 +2,15 @@
uniform mat4 proj;
uniform mat4 tran;
uniform mat4 cam;
+uniform mat4 rot;
in vec3 position;
-
+in vec3 vnormal;
+varying vec4 fragpos;
+varying vec4 fragnormal; // if this needs to not be blended jsut have all vertexes in a poly be the same
void main()
{
- gl_Position = proj * cam * tran * vec4(position, 1.0f);
+ //this is the actual position
+ gl_Position = proj * cam * tran * vec4(position, 1.0f);// - vec4(gl_Normal, 1.0f);
+ fragpos = tran * vec4(position, 1.0f);
+ fragnormal = (tran * vec4(vnormal, 1.0f)) - (tran * vec4(0.0, 0.0, 0.0, 1.0));
}