if(light_sources[i].type!=0)
{
IncomingLight incoming = get_incoming_light(i, world_vertex.xyz);
- float shadow = get_shadow_factor(i);
+ float shadow = get_shadow_factor(i, world_vertex);
color += cooktorrance_one_light_direct(normal, look, incoming.direction, base_color, metalness, roughness)*incoming.color*shadow;
}