Last change
on this file since 3860 was
3463,
checked in by bensch, 19 years ago
|
orxonox/data: added new Directory and some shaders
|
File size:
506 bytes
|
Line | |
---|
1 | // simple toon fragment shader |
---|
2 | // www.lighthouse3d.com |
---|
3 | |
---|
4 | varying vec3 normal, lightDir; |
---|
5 | |
---|
6 | void main() |
---|
7 | { |
---|
8 | float intensity; |
---|
9 | vec3 n; |
---|
10 | vec4 color; |
---|
11 | |
---|
12 | n = normalize(normal); |
---|
13 | intensity = max(dot(lightDir,n),0.0); |
---|
14 | |
---|
15 | /* if (intensity > 0.98) |
---|
16 | color = vec4(0.8,0.8,0.8,1.0); |
---|
17 | else if (intensity > 0.5) |
---|
18 | color = vec4(0.8,0.4,0.4,1.0); |
---|
19 | else if (intensity > 0.25) |
---|
20 | color = vec4(0.4,0.2,0.2,1.0); |
---|
21 | else*/ |
---|
22 | color = vec4(normal,1.0); |
---|
23 | //vec4(0.1,0.1,0.1,1.0); |
---|
24 | |
---|
25 | gl_FragColor = color; |
---|
26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.