mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
8dadfb4878
Cmake: Add FTE_WERROR option, defaults to true in debug builds and off in release builds (in case future compilers have issues). Cmake: Pull in libXscreensaver so we don't get interrupted by screensavers when playing demos. Make: Added `make webcl-rel` for a web build without server bloat (eg for sites focused on demo playback. Yes, this means you XantoM). fteqcc: Include the decompiler in fteqcc (non-gui) builds ('-d' arg). fteqcc: Decompiler can now mostly handle hexen2 mods without any unknown opcodes. Allow ezHud and OpenSSL to be compiled as in-engine plugins, potentially for web and windows ports respectively. Web: Fix support for ogg vorbis. Add support for voip. Web: Added basic support for WebXR. QTV: Don't try seeking on unseekable qtv streams. Don't spam when developer 1 is set. QTV: add support for some eztv extensions. MVD: added hack to use ktx's vweps in mvd where mvdsv doesn't bother to record the info. qwfwd: hack around a hack in qwfwd, allowing it to work again. recording: favour qwd in single player, instead of mvd. Protocol: reduce client memory used for precache names. Bump maximum precache counts - some people are just abusive, yes you Orl. hexen2: add enough clientside protocol compat to play the demo included with h2mp. lacks effects. in_xflip: restored this setting. fs_hidesyspaths: new cvar, defaults to enabled so you won't find your username or whatever turning up in screenshots or the like. change it to 0 before debuging stuff eg via 'path'. gl_overbright_models: Added cvar to match QS. netchan: Added MTU determination, we'll no longer fail to connect when routers stupidly drop icmp packets. Win: try a few other versions of xinput too. CSQC: Added a CSQC_GenerateMaterial function, to give the csqc a chance to generate custom materials. MenuQC: Added support for the skeletal objects API.
46 lines
805 B
HLSL
46 lines
805 B
HLSL
!!samps diffuse
|
|
//!!cvarf r_wateralpha
|
|
|
|
struct a2v
|
|
{
|
|
float4 pos: POSITION;
|
|
float2 tc: TEXCOORD0;
|
|
};
|
|
struct v2f
|
|
{
|
|
float4 pos: SV_POSITION;
|
|
float2 tc: TEXCOORD0;
|
|
};
|
|
|
|
#include <ftedefs.h>
|
|
|
|
#ifdef VERTEX_SHADER
|
|
v2f main (a2v inp)
|
|
{
|
|
v2f outp;
|
|
outp.pos = mul(m_model, inp.pos);
|
|
outp.pos = mul(m_view, outp.pos);
|
|
outp.pos = mul(m_projection, outp.pos);
|
|
outp.tc = inp.tc;
|
|
return outp;
|
|
}
|
|
#endif
|
|
|
|
#ifdef FRAGMENT_SHADER
|
|
// float cvar_r_wateralpha;
|
|
// float e_time;
|
|
SamplerState s_diffuse;
|
|
Texture2D t_diffuse;
|
|
float4 main (v2f inp) : SV_TARGET
|
|
{
|
|
float2 ntc = inp.tc + sin(inp.tc.yx+e_time)*0.125;
|
|
float4 r;
|
|
r = t_diffuse.Sample(s_diffuse, ntc);
|
|
#ifdef ALPHA
|
|
r.a = float(ALPHA);
|
|
#else
|
|
// r.a *= r_wateralpha;
|
|
#endif
|
|
return r;
|
|
}
|
|
#endif
|