X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=shaderlib%2Fphong.glsl;h=080c904895668f1e985a893ef959fb467ee0a91d;hb=37076ae3c42e963d8ee90e54f06da1227d85129f;hp=004232acd503e4c76c607ca6206f2f4e228cdef1;hpb=adc26a2e141a2853b6c5025130c46a46cece4b84;p=libs%2Fgl.git diff --git a/shaderlib/phong.glsl b/shaderlib/phong.glsl index 004232ac..080c9048 100644 --- a/shaderlib/phong.glsl +++ b/shaderlib/phong.glsl @@ -30,8 +30,6 @@ layout(constant_id=auto) const bool use_emission = false; layout(constant_id=auto) const bool use_emission_map = false; layout(constant_id=auto) const bool use_reflectivity = false; layout(constant_id=auto) const bool use_reflectivity_map = false; -layout(constant_id=auto) const bool use_sky = false; -layout(constant_id=auto) const bool use_fog = false; #pragma MSP stage(fragment) virtual vec4 get_diffuse_color() @@ -79,15 +77,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 +96,9 @@ vec3 phong_lighting(vec3 normal, vec3 look, vec3 surface_diffuse, vec3 surface_s for(int i=0; i