mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-12-03 17:11:51 +00:00
29 lines
539 B
Text
29 lines
539 B
Text
|
!!cvarf ffov
|
||
|
|
||
|
//panoramic view rendering, for promo map shots or whatever.
|
||
|
|
||
|
#ifdef VERTEX_SHADER
|
||
|
attribute vec2 v_texcoord;
|
||
|
varying vec2 texcoord;
|
||
|
void main()
|
||
|
{
|
||
|
texcoord = v_texcoord.xy;
|
||
|
gl_Position = ftetransform();
|
||
|
}
|
||
|
#endif
|
||
|
#ifdef FRAGMENT_SHADER
|
||
|
uniform samplerCube s_t0;
|
||
|
varying vec2 texcoord;
|
||
|
uniform float cvar_ffov;
|
||
|
void main()
|
||
|
{
|
||
|
vec3 tc;
|
||
|
float ang;
|
||
|
ang = texcoord.x*-radians(cvar_ffov);
|
||
|
tc.x = sin(ang);
|
||
|
tc.y = -texcoord.y;
|
||
|
tc.z = cos(ang);
|
||
|
gl_FragColor = textureCube(s_t0, tc);
|
||
|
}
|
||
|
#endif
|