Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/trunk/shaders/outile.vert @ 4448

Last change on this file since 4448 was 3542, checked in by bensch, 18 years ago

data: new shaders

File size: 460 bytes
Line 
1
2uniform vec3 camPos;
3uniform float outlineThreshold;
4uniform float edgeThreshold;
5
6varying vec3 norm;
7
8void main(){
9        vec4 pos = gl_Vertex;
10    vec3 dir = camPos - gl_Vertex.xyz;
11
12        pos.w = float(
13                dot(dir, gl_MultiTexCoord0.xyz) * dot(dir, gl_MultiTexCoord1.xyz) < outlineThreshold ||
14                dot(gl_MultiTexCoord0.xyz, gl_MultiTexCoord1.xyz) < edgeThreshold);
15
16        gl_Position = gl_ModelViewProjectionMatrix * pos;
17}
18
Note: See TracBrowser for help on using the repository browser.