2018-03-04 14:41:16 +00:00
|
|
|
!!cvard_srgb_b r_floorcolor
|
|
|
|
!!cvard_srgb_b r_wallcolor
|
2012-05-09 15:30:53 +00:00
|
|
|
!!permu FOG
|
2018-12-04 08:53:18 +00:00
|
|
|
!!samps lm=0
|
2012-05-09 15:30:53 +00:00
|
|
|
|
|
|
|
//this is for the '286' preset walls, and just draws lightmaps coloured based upon surface normals.
|
|
|
|
|
|
|
|
#include "sys/fog.h"
|
|
|
|
varying vec4 col;
|
|
|
|
#ifdef VERTEX_SHADER
|
|
|
|
attribute vec3 v_normal;
|
|
|
|
attribute vec2 v_lmcoord;
|
|
|
|
varying vec2 lm;
|
|
|
|
uniform vec4 e_lmscale;
|
|
|
|
void main ()
|
|
|
|
{
|
2018-09-01 04:18:08 +00:00
|
|
|
#ifdef LM
|
|
|
|
col = vec4(1.0);
|
|
|
|
#else
|
2018-03-04 14:41:16 +00:00
|
|
|
col = vec4(e_lmscale.rgb * ((v_normal.z < 0.73)?r_wallcolor:r_floorcolor), e_lmscale.a);
|
2018-09-01 04:18:08 +00:00
|
|
|
#endif
|
2012-05-09 15:30:53 +00:00
|
|
|
lm = v_lmcoord;
|
|
|
|
gl_Position = ftetransform();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#ifdef FRAGMENT_SHADER
|
|
|
|
varying vec2 lm;
|
|
|
|
void main ()
|
|
|
|
{
|
2018-11-27 16:48:19 +00:00
|
|
|
gl_FragColor = fog4(col * texture2D(s_lm, lm));
|
2012-05-09 15:30:53 +00:00
|
|
|
}
|
|
|
|
#endif
|