color += cooktorrance_one_light_direct(normal, look, incoming.direction, base_color, metalness, roughness)*incoming.color*shadow;
}
- color += cooktorrance_environment(normal, look, base_color, metalness, roughness);
-
- color *= get_occlusion_value();
+ float occlusion = get_occlusion_value();
+ color += cooktorrance_environment(normal, look, base_color, metalness, roughness)*occlusion;
if(use_emission)
color += get_emission_color();