2012-05-09 15:30:53 +00:00
|
|
|
!!permu FOG
|
2018-11-27 16:48:19 +00:00
|
|
|
!!samps 1
|
2012-05-09 15:30:53 +00:00
|
|
|
//used by both particles and sprites.
|
|
|
|
//note the fog blending mode is all that differs from defaultadditivesprite
|
|
|
|
|
2022-01-17 09:13:05 +00:00
|
|
|
#include "sys/defs.h"
|
2012-05-09 15:30:53 +00:00
|
|
|
#include "sys/fog.h"
|
|
|
|
varying vec2 tc;
|
|
|
|
varying vec4 vc;
|
2022-01-17 09:13:05 +00:00
|
|
|
#ifdef VERTEX_SHADER
|
2012-05-09 15:30:53 +00:00
|
|
|
void main ()
|
|
|
|
{
|
|
|
|
tc = v_texcoord;
|
|
|
|
vc = v_colour;
|
|
|
|
gl_Position = ftetransform();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#ifdef FRAGMENT_SHADER
|
2017-07-04 05:07:51 +00:00
|
|
|
uniform vec4 e_vlscale;
|
2012-05-09 15:30:53 +00:00
|
|
|
void main ()
|
|
|
|
{
|
2013-04-08 03:51:21 +00:00
|
|
|
vec4 col = texture2D(s_t0, tc);
|
|
|
|
#ifdef MASK
|
2014-01-13 02:42:25 +00:00
|
|
|
if (col.a < float(MASK))
|
2013-04-08 03:51:21 +00:00
|
|
|
discard;
|
|
|
|
#endif
|
2017-07-04 05:07:51 +00:00
|
|
|
gl_FragColor = fog4blend(col * vc * e_colourident * e_vlscale);
|
2012-05-09 15:30:53 +00:00
|
|
|
}
|
|
|
|
#endif
|