Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 4407 was 3542, checked in by bensch, 19 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.