mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-15 08:52:28 +00:00
5b4756f3d9
Fixed some xim issues, for proper keyboard input under x11. Cmake project can now work for cross compiling win32 targets. Some other fun-but-pointless stuff. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5344 fc73d0e0-1445-4013-8a0c-d673dee63da5
32 lines
731 B
GLSL
32 lines
731 B
GLSL
!!permu FOG
|
|
!!samps 2
|
|
#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
|
|
uniform float e_time;
|
|
uniform vec3 e_eyepos;
|
|
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 = vec4(fog3((solid.rgb*(1.0-clouds.a)) + (clouds.a*clouds.rgb)), 1.0);
|
|
}
|
|
#endif
|