mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-30 07:31:13 +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
751 B
GLSL
34 lines
751 B
GLSL
!!permu FOG
|
|
!!samps 2
|
|
!!cvarb r_fog_exp2=true
|
|
|
|
#include "sys/defs.h"
|
|
#include "sys/fog.h"
|
|
|
|
//regular sky shader for scrolling q1 skies
|
|
//the sky surfaces are thrown through this as-is.
|
|
|
|
#ifdef VERTEX_SHADER
|
|
varying vec3 pos;
|
|
void main ()
|
|
{
|
|
pos = v_position.xyz;
|
|
gl_Position = ftetransform();
|
|
}
|
|
#endif
|
|
#ifdef FRAGMENT_SHADER
|
|
varying vec3 pos;
|
|
void main ()
|
|
{
|
|
vec2 tccoord;
|
|
vec3 dir = pos - e_eyepos;
|
|
dir.z *= 3.0;
|
|
dir.xy /= 0.5*length(dir);
|
|
tccoord = (dir.xy + e_time*0.03125);
|
|
vec3 solid = vec3(texture2D(s_t0, tccoord));
|
|
tccoord = (dir.xy + e_time*0.0625);
|
|
vec4 clouds = texture2D(s_t1, tccoord);
|
|
gl_FragColor.rgb = fog3((solid.rgb*(1.0-clouds.a)) + (clouds.a*clouds.rgb));
|
|
gl_FragColor.a = 1.0;
|
|
}
|
|
#endif
|