         }
     }
     shadow /= 16;
-
     Lo.rgb *= shadow;
 
     vec3 corrected_normal = box_correct(environment.extent, environment.position,normal);

    float ambient_occlusion_from_map = texture(material.ambient_occlusion_map, fragment.uv).r;
    float ambient_occlusion = material.ambient_occlusion * ambient_occlusion_from_map;

    //TODO: Function

    for (int i = 0; i < max_decals; i++){

    kD *= 1.0 - metallic;

    float NdotL = max(dot(N, L), 0.0);
    float cos_dir = dot(L, -light.direction);
    float spot_effect = smoothstep(cos(light.angle / 2.0), cos(light.angle / 2.0 - 0.1), cos_dir);

    vec3 Lo = (kD * albedo / PI + specular) * radiance * NdotL * spot_effect;

    vec3 shadow_map_uv = fragment.proj_shadow.xyz / fragment.proj_shadow.w;

