     tangent = normalize(tangent - dot(tangent, normal) * normal);
     vec3 bitangent = cross(tangent, normal);
 
-    vec3 norm_normal = texture(normal_map, tex_coord).xyz;
-    norm_normal = 2.0 * norm_normal - vec3(1.0, 1.0, 1.0);
-
     mat3 tangent_bitangent_normal = mat3(tangent, bitangent, normal);
 
-    vec3 new_norm = tangent_bitangent_normal * norm_normal;
-    return normalize(new_norm);
+    vec3 map_normal = texture(normal_map, tex_coord).xyz;
+    map_normal = 2.0 * map_normal - vec3(1.0, 1.0, 1.0);
+
+    vec3 new_normal = tangent_bitangent_normal * map_normal;
+    return normalize(new_normal);
 }
 
 void calc_common_lighting(in vec3 normal_vec, in vec3 dir, in vec3 half_vec,

    dir = dir / dist; // normalize, but reuse length instead of calling normalize
}

// TODO: not properly lighting walls
void calc_point_spot_light(in vec3 pos, in vec3 forward, in vec3 normal_vec,
    in vec3 dir, in float atten, in Material material, in Base_light base,
    out vec3 scattered, out vec3 reflected)

    if(!dir_light.base.enabled)
        return;

    calc_common_lighting(normal_vec, normalize(dir_light.dir), normalize(dir_light.half_vec), material, dir_light.base, 1.0,
        scattered, reflected);
}
