summaryrefslogtreecommitdiff
path: root/shaders/humus-raytracedshadows/5.vert
blob: 3c3c10a46058b087c3f7e7cfafdf43402296b037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#define saturate(x) clamp(x,0.0,1.0)
#define lerp mix
#line 0


uniform vec3 lightPos;

uniform float scale;
uniform vec3 offset;

varying vec3 lightVec;
varying vec3 normal;

void main(){
	vec4 pos = gl_Vertex;
	pos.xyz *= scale;
	pos.xyz += offset;

	gl_Position = gl_ModelViewProjectionMatrix * pos;

	lightVec = normalize(lightPos - pos.xyz);
	normal = gl_Vertex.xyz;
}