mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +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
21 lines
523 B
GLSL
21 lines
523 B
GLSL
!!samps 2
|
|
//this glsl shader is useful for cubemapped post processing effects (see csaddon for an example)
|
|
varying vec4 tf;
|
|
#ifdef VERTEX_SHADER
|
|
void main ()
|
|
{
|
|
gl_Position = tf = vec4(v_position.xy,-1.0, 1.0);
|
|
}
|
|
#endif
|
|
#ifdef FRAGMENT_SHADER
|
|
void main()
|
|
{
|
|
vec2 fc;
|
|
fc = tf.xy / tf.w;
|
|
vec3 raw = texture2D(s_t0, (1.0 + fc) / 2.0).rgb;
|
|
#define LUTSIZE 16.0
|
|
vec3 scale = vec3((LUTSIZE-1.0)/LUTSIZE);
|
|
vec3 bias = vec3(1.0/(2.0*LUTSIZE));
|
|
gl_FragColor = texture3D(s_t1, raw * scale + bias);
|
|
}
|
|
#endif
|