062cdf6b21
Q3TA: Fixed script parsing, so the menus are not so broken. Q3TA: added the UI_CIN_* and CG_CIN_* builtins for 2d cinematic playbacks. Q3TA: backspace should work for gamecode text entry now. Q3TA: map_restart now directly restarts without needing loading screens. Fixed multiple envmap generation bugs. Fixed envmaps getting flushed with r_keepimages 0. Console image previews can now display cubemaps (although their orientation is probably a little off). Made a 'remapshader' csqc builtin. Depending on the r_remapshader console command was stupid. Fixed packet command to create a udp socket, if needed. sv_public can now be set to a non-numeric name for custom names (instead of needing to poke sv_port too). Support extended data on the end of miptex entries in bsps. Requires a qbsp (like vanilla) that doesn't rewrite the miptex entries. Updated imgtool to generate/read our new extended miptex data. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5644 fc73d0e0-1445-4013-8a0c-d673dee63da5
40 lines
1.1 KiB
GLSL
40 lines
1.1 KiB
GLSL
!!permu FOG
|
|
!!samps reflectcube
|
|
!!cvardf r_skyfog=0.5
|
|
!!cvard4 r_glsl_skybox_orientation=0 0 0 0
|
|
#include "sys/defs.h"
|
|
#include "sys/fog.h"
|
|
|
|
//simple shader for simple skyboxes.
|
|
|
|
varying vec3 pos;
|
|
#ifdef VERTEX_SHADER
|
|
mat3 rotateAroundAxis(vec4 axis) //xyz axis, with angle in w
|
|
{
|
|
#define skyang axis.w*(3.14/180.0)*e_time
|
|
axis.xyz = normalize(axis.xyz);
|
|
float s = sin(skyang);
|
|
float c = cos(skyang);
|
|
float oc = 1.0 - c;
|
|
|
|
return mat3(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s,
|
|
oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s,
|
|
oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c);
|
|
}
|
|
void main ()
|
|
{
|
|
pos = v_position.xyz - e_eyepos;
|
|
|
|
if (r_glsl_skybox_orientation.xyz != vec3(0.0))
|
|
pos = pos*rotateAroundAxis(r_glsl_skybox_orientation);
|
|
|
|
gl_Position = ftetransform();
|
|
}
|
|
#endif
|
|
#ifdef FRAGMENT_SHADER
|
|
void main ()
|
|
{
|
|
vec4 skybox = textureCube(s_reflectcube, pos);
|
|
gl_FragColor = vec4(mix(skybox.rgb, fog3(skybox.rgb), float(r_skyfog)), 1.0);
|
|
}
|
|
#endif
|