diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-05-04 20:31:53 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-05-04 20:31:53 +0300 |
commit | fc0f6d19adae47cfb2d0abd31f4b44395179cb89 (patch) | |
tree | c12922e73afec9ebd3901a649ae21901c37ec041 | |
parent | 5d7ee444065021ab52d293c07638275611e826de (diff) |
Fix T96845: artifacts with GPU subdivision and mirror modifier
The coarse polygon count was set to the one of the BMesh instead of
the the one of the mesh used for subdivision, which caused the
compute shaders to output wrong data.
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_subdivision.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc index 19745304b2d..7d245f4158b 100644 --- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc +++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc @@ -1143,7 +1143,7 @@ static void draw_subdiv_init_ubo_storage(const DRWSubdivCache *cache, ubo->max_patch_face = cache->gpu_patch_map.max_patch_face; ubo->max_depth = cache->gpu_patch_map.max_depth; ubo->patches_are_triangular = cache->gpu_patch_map.patches_are_triangular; - ubo->coarse_poly_count = cache->bm ? cache->bm->totface : cache->num_coarse_poly; + ubo->coarse_poly_count = cache->num_coarse_poly; ubo->optimal_display = cache->optimal_display; ubo->num_subdiv_loops = cache->num_subdiv_loops; ubo->edge_loose_offset = cache->num_subdiv_loops * 2; |