2012-05-11 01:57:00 +00:00
|
|
|
!!cvarf r_bloom
|
2012-01-17 07:57:46 +00:00
|
|
|
//add them together
|
|
|
|
//optionally apply tonemapping
|
|
|
|
|
|
|
|
varying vec2 tc;
|
|
|
|
|
|
|
|
#ifdef VERTEX_SHADER
|
|
|
|
attribute vec2 v_texcoord;
|
|
|
|
void main ()
|
|
|
|
{
|
|
|
|
tc = v_texcoord;
|
|
|
|
gl_Position = ftetransform();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#ifdef FRAGMENT_SHADER
|
|
|
|
uniform sampler2D s_t0;
|
|
|
|
uniform sampler2D s_t1;
|
|
|
|
uniform sampler2D s_t2;
|
|
|
|
uniform sampler2D s_t3;
|
2014-08-27 08:41:31 +00:00
|
|
|
uniform float cvar_r_bloom;
|
2012-01-17 07:57:46 +00:00
|
|
|
void main ()
|
|
|
|
{
|
|
|
|
gl_FragColor =
|
|
|
|
texture2D(s_t0, tc) +
|
2012-05-11 01:57:00 +00:00
|
|
|
cvar_r_bloom*(
|
|
|
|
texture2D(s_t1, tc) +
|
|
|
|
texture2D(s_t2, tc) +
|
|
|
|
texture2D(s_t3, tc)
|
|
|
|
) ;
|
2012-01-17 07:57:46 +00:00
|
|
|
}
|
|
|
|
#endif
|