From 33c2afafa0c6b936dace4b2b6203f03a89823049 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Mon, 17 May 2010 01:22:56 +0200 Subject: Added colorization to fragment shader. --- bullet_fragment.glsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bullet_fragment.glsl') diff --git a/bullet_fragment.glsl b/bullet_fragment.glsl index 550585b..66f53a4 100644 --- a/bullet_fragment.glsl +++ b/bullet_fragment.glsl @@ -7,5 +7,6 @@ void main() { 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_Color; + gl_FragColor = vec4(texture2D(tex, l_uv)); + gl_FragColor.xyz += gl_Color.xyz - gl_Color.xyz * gl_FragColor.x; } -- cgit v1.2.3