summaryrefslogtreecommitdiff
path: root/bullet_fragment.glsl
blob: 66f53a4d40713752e1d21f018e0bd200c0c9c711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
varying mat4 v_tex_rot;
uniform sampler2D tex;

void main() {
	vec2 l_uv = gl_TexCoord[0].xy;
	const vec2 l_offset = vec2(0.5, 0.5);
	l_uv -= l_offset;
	l_uv = vec2(v_tex_rot * vec4(l_uv, 0.0, 1.0));
	l_uv += l_offset;
	gl_FragColor = vec4(texture2D(tex, l_uv));
	gl_FragColor.xyz += gl_Color.xyz - gl_Color.xyz * gl_FragColor.x;
}