Fix T96563: tangents artifacts with GPU subdivision

When tangent are computed from generated coordinates, the result for GPU
subdivision would be compressed to 16-bit when it shouldn't.
This commit is contained in:
Kévin Dietrich 2022-04-14 03:49:44 +02:00
parent 3e25561d51
commit f84f9eb8ed
Notes: blender-bot 2023-02-14 07:25:51 +01:00
Referenced by issue #96563, GPU subdivision: 3.0.1 - 3.1.0 EEVEE Tangent Space Discrepancy
1 changed files with 1 additions and 1 deletions

View File

@ -317,7 +317,7 @@ static void extract_tan_init_subdiv(const DRWSubdivCache *subdiv_cache,
GPU_vertbuf_tag_dirty(coarse_vbo);
/* Include stride in offset. */
const int dst_offset = (int)subdiv_cache->num_subdiv_loops * 4 * pack_layer_index++;
draw_subdiv_interp_custom_data(subdiv_cache, coarse_vbo, dst_buffer, 4, dst_offset, true);
draw_subdiv_interp_custom_data(subdiv_cache, coarse_vbo, dst_buffer, 4, dst_offset, false);
}
CustomData_free(&loop_data, mr->loop_len);