X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=shaderlib%2Fphong.glsl;h=ed091ce9a9374d0646ca900b9ca6210fd4be9dfb;hp=004232acd503e4c76c607ca6206f2f4e228cdef1;hb=4d276c9b986b111611b8396f94dae56dbe736387;hpb=fc00b25ad328d5cbb6c05c44f81284afe5451f81 diff --git a/shaderlib/phong.glsl b/shaderlib/phong.glsl index 004232ac..ed091ce9 100644 --- a/shaderlib/phong.glsl +++ b/shaderlib/phong.glsl @@ -79,15 +79,15 @@ vec3 phong_ambient(vec3 surface_diffuse) return ambient_color.rgb*surface_diffuse; } -vec3 phong_one_light(vec3 light, vec3 normal, vec3 look, vec3 light_color, vec3 surface_diffuse, vec3 surface_specular, float shininess) +vec3 phong_one_light(vec3 light, vec3 normal, vec3 look, vec3 surface_diffuse, vec3 surface_specular, float shininess) { float diffuse_intensity = max(dot(light, normal), 0.0); - vec3 color = light_color*surface_diffuse*diffuse_intensity; + vec3 color = surface_diffuse*diffuse_intensity; if(use_specular) { vec3 reflected = reflect(look, normal); float specular_intensity = pow(max(dot(reflected, light), 0.0), shininess); - color += light_color*surface_specular*specular_intensity; + color += surface_specular*specular_intensity; } return color; } @@ -98,9 +98,9 @@ vec3 phong_lighting(vec3 normal, vec3 look, vec3 surface_diffuse, vec3 surface_s for(int i=0; i