 }
 
 void main() {
-    vec3 normal = fragment.normal;
-
-    vec3 normal_from_map = texture(material.normal_map, fragment.uv).rgb * 2.0 - vec3(1.0);
-    normal_from_map = normalize(fragment.tbn * normal_from_map);
+    vec3 N = fragment.normal;
+
+    vec3 N_from_map = texture(material.normal_map, fragment.uv).rgb * 2.0 - vec3(1.0);
+    N_from_map = normalize(fragment.tbn * N_from_map);
 
     float amount = texture(material.normal_map, fragment.uv).a;
 
     if (amount > 0.0f){
-        normal = normalize(mix(normal, normal_from_map, amount));
+        N = normalize(mix(N, N_from_map, amount));
     }
 
     vec4 albedo_from_map = texture(material.albedo_map, fragment.uv);

    }

    const vec3 V = normalize(camera.position - fragment.position);
    const vec3 R = -reflect(fragment.camera_to_surface, normal);

    const float NdotV = max(dot(normal, V), 0.0);

    vec3 F0 = vec3(0.04);
    F0 = mix(F0, albedo, metallic);


    for (int i = 0; i < environments.length(); i++) {
      if (environments[i].strength > 0.0 && inside_box(fragment.position, environments[i].position, environments[i].extent)) {
        const vec3 corrected_N = box_correct(environments[i].extent, environments[i].position, N, fragment.position);
        const vec3 corrected_R = box_correct(environments[i].extent, environments[i].position, R, fragment.position);

        const vec2 environment_texture_size = textureSize(environment_samplers[i], 0);
        const float maxsize = max(environment_texture_size.x, environment_texture_size.x);
