mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-23 04:11:53 +00:00
27a59a0cbc
vulkan, wasapi, quake injector features added. irc, avplug, cef plugins/drivers reworked/updated/added openal reverb, doppler effects added. 'dir' console command now attempts to view clicked files. lots of warning fixes, should now only be deprecation warnings for most targets (depending on compiler version anyway...). SendEntity finally reworked to use flags properly. effectinfo improved, other smc-targetted fixes. mapcluster stuff now has support for linux. .basebone+.baseframe now exist in ssqc. qcc: -Fqccx supports qccx syntax, including qccx hacks. don't expect these to work in fteqw nor dp though. qcc: rewrote function call handling to use refs rather than defs. this makes struct passing more efficient and makes the __out keyword usable with fields etc. qccgui: can cope a little better with non-unicode files. can now represent most quake chars. qcc: suppressed warnings from *extensions.qc git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5000 fc73d0e0-1445-4013-8a0c-d673dee63da5
34 lines
No EOL
961 B
GLSL
34 lines
No EOL
961 B
GLSL
!!cvari r_menutint_inverse=0
|
|
!!cvar3f r_menutint=0.68 0.4 0.13
|
|
!!samps 1
|
|
|
|
#include "sys/defs.h"
|
|
|
|
const vec4 e_rendertexturescale = vec4(1,1,1,1);
|
|
|
|
layout(location=0) varying vec2 texcoord;
|
|
#ifdef VERTEX_SHADER
|
|
void main(void)
|
|
{
|
|
#ifdef VULKAN
|
|
texcoord.xy = v_texcoord.xy*e_rendertexturescale.xy;
|
|
#else
|
|
texcoord.x = v_texcoord.x*e_rendertexturescale.x;
|
|
texcoord.y = (1.0-v_texcoord.y)*e_rendertexturescale.y;
|
|
#endif
|
|
gl_Position = ftetransform();
|
|
}
|
|
#endif
|
|
#ifdef FRAGMENT_SHADER
|
|
const vec3 lumfactors = vec3(0.299, 0.587, 0.114);
|
|
const vec3 invertvec = vec3(1.0, 1.0, 1.0);
|
|
void main(void)
|
|
{
|
|
vec3 texcolor = texture2D(s_t0, texcoord).rgb;
|
|
float luminance = dot(lumfactors, texcolor);
|
|
texcolor = vec3(luminance, luminance, luminance);
|
|
texcolor *= cvar_r_menutint;
|
|
texcolor = (cvar_r_menutint_inverse > 0) ? (invertvec - texcolor) : texcolor;
|
|
gl_FragColor = vec4(texcolor, 1.0);
|
|
}
|
|
#endif |