* render Q3 shader based skyboxes
logic: load 6 skybox textures when shader gets used by scene, don't unload dynamically, just on 'flush' texture browser only uses normal preview image and doesn't trigger potentially heavy box loading also fix R_ResampleTexture for [2+x upscaling
This commit is contained in:
8
setup/data/tools/gl/skybox_fp.glsl
Normal file
8
setup/data/tools/gl/skybox_fp.glsl
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
uniform samplerCube skybox;
|
||||
|
||||
void main()
|
||||
{
|
||||
//doing rotation/flip to fix skybox orientation
|
||||
gl_FragColor = textureCube( skybox, vec3( -gl_TexCoord[0].y, gl_TexCoord[0].z, gl_TexCoord[0].x ) );
|
||||
}
|
||||
8
setup/data/tools/gl/skybox_vp.glsl
Normal file
8
setup/data/tools/gl/skybox_vp.glsl
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
uniform vec3 u_view_origin;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_TexCoord[0] = vec4( ( gl_Vertex.xyz - u_view_origin ), 1 );
|
||||
gl_Position = ftransform();
|
||||
}
|
||||
Reference in New Issue
Block a user