prosperon/shaders/postbase.cg

43 lines
413 B
Plaintext

#cull back
@vs vs
in vec3 a_pos;
in vec2 a_uv;
out vec2 uv;
void main()
{
vec3 pos = a_pos;
pos -= 0.5;
pos *= 2;
uv = a_uv;
gl_Position = vec4(pos.xy, 0, 1.0);
}
@end
@fs fs
in vec2 uv;
out vec4 color;
#define PI 3.141592
texture2D diffuse;
@sampler_type smp filtering
sampler smp;
uniform vec2 mouse;
uniform float time;
@include_block frag
void main()
{
frag();
}
@end
@program p vs fs