istereo

annotate sdr/test.p.glsl @ 40:9e8fb79fd959

converted to xcode 4 created xcodebuild makefile
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 19 Feb 2012 17:25:41 +0200
parents b39d8607f4bb
children
rev   line source
nuclear@5 1 #ifdef GL_ES
nuclear@5 2 precision mediump float;
nuclear@5 3 #endif
nuclear@5 4
nuclear@14 5 uniform sampler2D tex;
nuclear@14 6
nuclear@22 7 varying vec3 vpos;
nuclear@2 8 varying vec4 var_color;
nuclear@14 9 varying vec2 var_texcoord;
nuclear@2 10
nuclear@2 11 void main()
nuclear@2 12 {
nuclear@22 13 vec4 fog_color = vec4(0.6, 0.6, 0.6, 1.0);
nuclear@22 14
nuclear@22 15 float fog = exp(-(0.2 * -vpos.z));
nuclear@22 16
nuclear@14 17 vec4 texel = texture2D(tex, var_texcoord);
nuclear@14 18 texel.w = 1.0;
nuclear@14 19
nuclear@22 20 vec4 col = var_color * texel;
nuclear@22 21 gl_FragColor = mix(fog_color, col, fog);
nuclear@2 22 }