Fixed normal map gen bug

This commit is contained in:
Андреев Григорий 2025-09-06 21:05:03 +03:00
parent e33dd979d6
commit 9c0b13346e
2 changed files with 1 additions and 4 deletions

View File

@ -647,7 +647,7 @@ TextureDataR8G8B8A8 generate_normal_tex_for_one_fourth_of_a_cylinder(float s_res
Bublazhuzhka crap_on_the_back_side = fill_rectangle_with_crap(w, r);
mat3x2 trop_back_side = {.x.x = cord_resol.x, .y.y = cord_resol.y, .z = vec2_mul_vec2((vec2){r, r}, cord_resol)};
mat3 orient_back_side = {.x = {1, 0, 0}, .y = {0, 0, 1}, {0, 1, 0}};
mat3 orient_back_side = {.x = {1, 0, 0}, .y = {0, 0, 1}, .z = {0, 1, 0}};
draw_polygon_on_normal_texture_flat_param_surf(&res, (vec2){0, 0}, (vec2){w, 0}, (vec2){w, r}, trop_back_side, orient_back_side,
(FnHeightMapGradFlatSurfCallback){.fn = height_map_cb_that_uses_bublazhuzhka, .guest = &crap_on_the_back_side});
draw_polygon_on_normal_texture_flat_param_surf(&res, (vec2){0, 0}, (vec2){0, r}, (vec2){w, r}, trop_back_side, orient_back_side,

View File

@ -60,7 +60,4 @@ void main(){
// todo: add specular map texture
vec3 color = natural_color * diffuse_illumination + 0.5 * specular_illumination;
fin_color = vec4(color, 1);
// fin_color = vec4(compressed_normal, 1);
// fin_color = vec4(specular_illumination, 1);
// fin_color = vec4(length(norm) > 1 ? length(norm) - 1 : 0, length(norm) < 1 ? length(norm) - 1 : 0, 0, 1);
}