[Bf-blender-cvs] [c19112d755f] blender-v2.82-release: Fix T61685 Curve extrusion looses flat shading in certain viewport shading

Clément Foucault noreply at git.blender.org
Tue Feb 4 19:32:36 CET 2020


Commit: c19112d755f1aa0e2343e07a8f6162a438189a7b
Author: Clément Foucault
Date:   Tue Feb 4 19:31:00 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rBc19112d755f1aa0e2343e07a8f6162a438189a7b

Fix T61685 Curve extrusion looses flat shading in certain viewport shading

This was caused by default surface batch not using loop normals.

===================================================================

M	source/blender/draw/intern/draw_cache_impl_curve.c

===================================================================

diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c
index 85340fae35d..25699cd7653 100644
--- a/source/blender/draw/intern/draw_cache_impl_curve.c
+++ b/source/blender/draw/intern/draw_cache_impl_curve.c
@@ -949,8 +949,7 @@ void DRW_curve_batch_cache_create_requested(Object *ob)
 
   /* Init batches and request VBOs & IBOs */
   if (DRW_batch_requested(cache->batch.surfaces, GPU_PRIM_TRIS)) {
-    DRW_ibo_request(cache->batch.surfaces, &cache->ibo.surfaces_tris);
-    DRW_vbo_request(cache->batch.surfaces, &cache->ordered.pos_nor);
+    DRW_vbo_request(cache->batch.surfaces, &cache->ordered.loop_pos_nor);
   }
   if (DRW_batch_requested(cache->batch.surfaces_edges, GPU_PRIM_LINES)) {
     DRW_ibo_request(cache->batch.surfaces_edges, &cache->ibo.surfaces_lines);



More information about the Bf-blender-cvs mailing list