bloomprep.shader

00001 void main() 
00002 {
00003     //Use the first set of texture coordinates in the fragment shader 
00004     gl_TexCoord[0] = gl_MultiTexCoord0;
00005 
00006     // Transform the position to screen space
00007     gl_Position = ftransform(); 
00008 }
00009 
00010 ~~~~~~~
00011 
00012 uniform sampler2D Texture0;
00013 
00014 uniform float threshold;
00015 
00016 void main() 
00017 {
00018     vec4 b = texture2D( Texture0, gl_TexCoord[0].xy );
00019 
00020     // Cut off?
00021     gl_FragColor = max( b - threshold, 0.0 ) * ( 1.0 / threshold );
00022 }

Generated on Fri Mar 23 12:55:03 2007 for glsldemo by  doxygen 1.5.1-p1