source:
data/branches/single_player_map/shaders/outile.vert
@
4077
Last change on this file since 4077 was 3542, checked in by bensch, 19 years ago | |
---|---|
File size: 460 bytes |
Line | |
---|---|
1 | |
2 | uniform vec3 camPos; |
3 | uniform float outlineThreshold; |
4 | uniform float edgeThreshold; |
5 | |
6 | varying vec3 norm; |
7 | |
8 | void 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.