mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-14 16:31:38 +00:00
b7784f41d9
Stripped obsolete vk_nv_dedicated_allocation extension. Misc fixes for warnings. Linux now defaults to using ~/.local/share/fte instead of ~/.fte for greater consistency. Other misc linux tweaks. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5267 fc73d0e0-1445-4013-8a0c-d673dee63da5
27 lines
656 B
GLSL
27 lines
656 B
GLSL
!!permu FOG
|
|
!!cvar3f r_floorcolor=0.5,0.5,0.5
|
|
!!cvar3f r_wallcolor=0.25,0.25,0.5
|
|
!!cvarb r_fog_exp2=true
|
|
!!samps 1
|
|
#include "sys/defs.h"
|
|
|
|
//this is for the '286' preset walls, and just draws lightmaps coloured based upon surface normals.
|
|
|
|
#include "sys/fog.h"
|
|
layout(location=0) varying vec4 col;
|
|
layout(location=1) varying vec2 lm;
|
|
|
|
#ifdef VERTEX_SHADER
|
|
void main ()
|
|
{
|
|
col = vec4(e_lmscale.rgb/255.0 * ((v_normal.z < 0.73)?cvar_r_wallcolor:cvar_r_floorcolor), e_lmscale.a);
|
|
lm = v_lmcoord;
|
|
gl_Position = ftetransform();
|
|
}
|
|
#endif
|
|
#ifdef FRAGMENT_SHADER
|
|
void main ()
|
|
{
|
|
gl_FragColor = fog4(col * texture2D(s_t0, lm));
|
|
}
|
|
#endif
|