mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-15 08:52:28 +00:00
869e544ad4
fix vbos not being used for skeletal animations (50->770 fps jump, yes, really. OOPS!) so yeah, 7700% speedup there. lol... *sigh* fixed update notification prompt not appearing by splitting menu key dest into emenu+gmenu. thus the prompt is no longer killed by menu.dat starting up. fog command now displays a the extra params. rewrote console char handling to support 32bit unicode chars. font code does not support more than 16bit codepoints still, however. rewrote beam code in order to restore models on vid_restart. this solves a crash where they were invalid pointers afterwards. revived old menu_media, because jogi wanted shuffle. music now fades out for a sec when changing fake-cd-tracks. music no longer abruptly stops when changing maps. added fxaa support. reworked bloom a bit. can now bloom further. added r_renderscale cvar, for people that want supersampling (max 2), or subsampling for more speed or whatever. $timer now favours cvars with that name, rather than the $time macro. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4942 fc73d0e0-1445-4013-8a0c-d673dee63da5
33 lines
632 B
GLSL
33 lines
632 B
GLSL
!!cvarf r_bloom
|
|
!!cvarf r_bloom_retain=1.0
|
|
//add them together
|
|
//optionally apply tonemapping
|
|
|
|
varying vec2 tc;
|
|
|
|
#ifdef VERTEX_SHADER
|
|
attribute vec2 v_texcoord;
|
|
void main ()
|
|
{
|
|
tc = v_texcoord;
|
|
gl_Position = ftetransform();
|
|
}
|
|
#endif
|
|
#ifdef FRAGMENT_SHADER
|
|
uniform sampler2D s_t0;
|
|
uniform sampler2D s_t1;
|
|
uniform sampler2D s_t2;
|
|
uniform sampler2D s_t3;
|
|
uniform float cvar_r_bloom;
|
|
uniform float cvar_r_bloom_retain;
|
|
void main ()
|
|
{
|
|
gl_FragColor =
|
|
cvar_r_bloom_retain * texture2D(s_t0, tc) +
|
|
cvar_r_bloom*(
|
|
texture2D(s_t1, tc) +
|
|
texture2D(s_t2, tc) +
|
|
texture2D(s_t3, tc)
|
|
) ;
|
|
}
|
|
#endif
|