source:
data/trunk/shaders/outile.vert
@
3881
Last change on this file since 3881 was 3542, checked in by bensch, 19 years ago | |
---|---|
File size: 460 bytes |
Rev | Line | |
---|---|---|
[3542] | 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.