vrshoot

view sdr/level.p.glsl @ 2:334d17aed7de

visual studio project files
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 02 Feb 2014 18:36:38 +0200
parents
children
line source
1 uniform sampler2D tex;
3 varying vec3 vpos;
4 varying vec2 texcoord;
6 void main()
7 {
8 vec4 tex = texture2D(tex, texcoord.xy);
10 float fog = clamp(40.0 / (vpos.z * vpos.z), 0.0, 1.0);
12 gl_FragColor.rgb = tex.rgb * fog;
13 gl_FragColor.a = tex.a;
14 }