mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-23 04:11:53 +00:00
4c2066601a
Fixed up the -netquake / -spasm / -fitz args slightly, should actually be usable now. sv_mintic 0 is now treated as 0.013 when using nqplayerphysics, to try to make it smoother for nq clients. Preparing for astc's volume formats. Mostly for completeness, I was bored. Disabled for now because nothing supports them anyway. Fix broken mousewheel in SDL2 builds. Fix configs not getting loaded following initial downloads in the web port/etc. Make the near-cloud layer of q1 scrolling sky fully opaque by default (like vanilla). Sky fog now ignores depth, treating it as an infinite distance. Fix turbs not responding to fog. r_fullbright no longer needs vid_reload to take effect (and more efficient now). Tweaked the audio code to use an format enum instead of byte width, just with the same values still, primarily to clean up loaders that deal with S32 vs F32, or U8 vs S8. Added a cvar to control whether to use threads for the qcgc. Still disabled by default but no longer requires engine recompiles to enable! git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5683 fc73d0e0-1445-4013-8a0c-d673dee63da5
47 lines
909 B
GLSL
47 lines
909 B
GLSL
!!ver 100 450
|
|
!!permu FOG
|
|
!!samps diffuse lightmap
|
|
|
|
#include "sys/defs.h"
|
|
|
|
//this is the shader that's responsible for drawing default q1 turbulant water surfaces
|
|
//this is expected to be moderately fast.
|
|
|
|
#include "sys/fog.h"
|
|
|
|
varying vec2 tc;
|
|
#ifdef LIT
|
|
varying vec2 lm0;
|
|
#endif
|
|
#ifdef VERTEX_SHADER
|
|
void main ()
|
|
{
|
|
tc = v_texcoord.st;
|
|
#ifdef FLOW
|
|
tc.s += e_time * -0.5;
|
|
#endif
|
|
#ifdef LIT
|
|
lm0 = v_lmcoord;
|
|
#endif
|
|
gl_Position = ftetransform();
|
|
}
|
|
#endif
|
|
#ifdef FRAGMENT_SHADER
|
|
void main ()
|
|
{
|
|
vec2 ntc;
|
|
ntc.s = tc.s + sin(tc.t+e_time)*0.125;
|
|
ntc.t = tc.t + sin(tc.s+e_time)*0.125;
|
|
vec3 ts = vec3(texture2D(s_diffuse, ntc));
|
|
|
|
#ifdef LIT
|
|
ts *= (texture2D(s_lightmap, lm0) * e_lmscale).rgb;
|
|
#endif
|
|
|
|
#ifdef ALPHA
|
|
gl_FragColor = fog4blend(vec4(ts, float(ALPHA)) * e_colourident);
|
|
#else
|
|
gl_FragColor = fog4(vec4(ts, 1.0) * e_colourident);
|
|
#endif
|
|
}
|
|
#endif
|