summaryrefslogtreecommitdiff
path: root/example/vertexshadowshader.glsl
blob: 8ba82287ef35a132234e0b0c2d7399f7e4ecada8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#version 130
uniform mat4 proj;
uniform mat4 tran;
uniform mat4 cam;
uniform mat4 rot;
in vec3 position;
in vec3 vnormal;
in vec3 texcoord;
varying vec4 fragpos;
varying vec4 fragnormal; // if this needs to not be blended jsut have all vertexes in a poly be the same
varying vec2 fragtexcoord;
void main() 
{
	//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));
	fragtexcoord = texcoord.xy;
}