mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-23 04:11:53 +00:00
5d2ff1286d
schannel (ie: windows native) works as a client, not a server. gnutls provides both client+server support. servers need to load a pre-generated cert from disk. tweaked gamepads to actually work in the web target. tweak gamepads a bit. added gp_* bind aliases. xinput+sdl+web should all use the same key mappings. finally added the itemtimer glsl. tweaked software renderer to not be quite so buggy, but you probably won't realise that if you try it. disabled the ill-fated QWOVERQ3 feature. don't do the oldorigin thing in quakeworld mods. hopefully this'll fix cspree's weird stuck-in-floor issue. dpp7 is buggy serverside. disabled for now. I'm part way through rewriting its deltas. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5103 fc73d0e0-1445-4013-8a0c-d673dee63da5
43 lines
787 B
GLSL
43 lines
787 B
GLSL
!!permu FOG
|
|
|
|
#include "sys/defs.h"
|
|
#include "sys/fog.h"
|
|
|
|
varying vec2 tc;
|
|
varying vec4 vc;
|
|
|
|
#ifdef VERTEX_SHADER
|
|
void main ()
|
|
{
|
|
tc = v_texcoord;
|
|
vc = v_colour;
|
|
gl_Position = ftetransform();
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifdef FRAGMENT_SHADER
|
|
void main ()
|
|
{
|
|
gl_FragColor = vec4(0.5,0.5,0.5,1);//texture2D(s_diffuse, tc.xy);
|
|
|
|
vec2 st = (tc-floor(tc)) - 0.5;
|
|
st *= 2.0;
|
|
float dist = sqrt(dot(st,st));
|
|
|
|
float ring = 1.0 + smoothstep(0.9, 1.0, dist)
|
|
- smoothstep(0.8, 0.9, dist);
|
|
|
|
//fade out the rim
|
|
if ((atan(st.t, st.s)+3.14)/6.28 > vc.a)
|
|
gl_FragColor.a *= 0.25;
|
|
gl_FragColor.rgb *= mix(vc.rgb, vec3(0.0), ring);
|
|
//gl_FragColor.a;
|
|
|
|
//and finally hide it all if we're fogged.
|
|
#ifdef FOG
|
|
gl_FragColor = fog4additive(gl_FragColor);
|
|
#endif
|
|
}
|
|
#endif
|
|
|