dungeon_crawler

diff prototype/sdr/mrt.p.glsl @ 79:110b2af4b9d8

fixed the shader non-conformity by explicitly converting 2.2 to vec3 before passing it to pow for the texel inverse-gamma thing
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 27 Oct 2012 01:54:39 +0300
parents 12a1dcfe91fa
children a373b36ffc17
line diff
     1.1 --- a/prototype/sdr/mrt.p.glsl	Fri Oct 26 21:22:14 2012 +0300
     1.2 +++ b/prototype/sdr/mrt.p.glsl	Sat Oct 27 01:54:39 2012 +0300
     1.3 @@ -30,7 +30,7 @@
     1.4  	float fog = clamp((fog_end + pos.z) / (fog_end - fog_start), 0.0, 1.0);
     1.5  
     1.6  	vec3 texel_srgb = texture2D(tex_dif, gl_TexCoord[0].st).xyz;
     1.7 -	vec3 texel = pow(texel_srgb.xyz, 2.2);
     1.8 +	vec3 texel = pow(texel_srgb.xyz, vec3(2.2, 2.2, 2.2));
     1.9  
    1.10  	vec3 diffuse = fog * (gl_FrontMaterial.diffuse.xyz * texel);
    1.11  	vec3 spec = fog * gl_FrontMaterial.specular.xyz;