source: java/client_3D/static/shared/res/shaders/old_stone.glsl @ 65

Last change on this file since 65 was 65, checked in by Maciej Komosinski, 13 years ago

added sources of the 3D client for the Framsticks server

File size: 455 bytes
Line 
1//name stone
2//vert
3       
4varying vec2 texCoord;
5varying vec3 normalVec;
6
7void main(void)
8{
9        gl_Position = ftransform();
10        texCoord = gl_MultiTexCoord0.xy * 0.4;
11        normalVec = normalize(gl_NormalMatrix * gl_Normal);
12}
13       
14//frag
15
16varying vec2 texCoord;
17uniform sampler2D diffuseMap;
18varying vec3 normalVec;
19
20void main (void)
21{
22        vec4 base = texture2D(diffuseMap, texCoord);
23       
24        float c = dot(normalVec, vec3(0,0,-1));
25        c = abs(c);
26        gl_FragColor = base * (1.0-c);
27}
Note: See TracBrowser for help on using the repository browser.