diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-02-15 19:51:19 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-02-15 19:53:22 +0300 |
commit | 48b26d9c2e0f4f4b6b5b7279c5bfc40c3ec77a6f (patch) | |
tree | 87ac7bfedae5d3e64c5fcac71a740bb02872ff94 /source/blender/draw/intern/draw_subdivision.h | |
parent | 430ced76d559d828b6f47c5fbb22530dcc70c257 (diff) |
Fix T95697: GPU subdivision ignores custom normals
Similarly to the CPU subdivision, we interpolate custom loop normals
from the coarse mesh, and this for the final normals.
Diffstat (limited to 'source/blender/draw/intern/draw_subdivision.h')
-rw-r--r-- | source/blender/draw/intern/draw_subdivision.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_subdivision.h b/source/blender/draw/intern/draw_subdivision.h index 65e845c21a4..78313441a70 100644 --- a/source/blender/draw/intern/draw_subdivision.h +++ b/source/blender/draw/intern/draw_subdivision.h @@ -67,6 +67,7 @@ typedef struct DRWSubdivCache { struct Subdiv *subdiv; bool optimal_display; bool do_limit_normals; + bool use_custom_loop_normals; /* Coordinates used to evaluate patches for UVs, positions, and normals. */ struct GPUVertBuf *patch_coords; @@ -186,6 +187,10 @@ void draw_subdiv_finalize_normals(const DRWSubdivCache *cache, struct GPUVertBuf *subdiv_loop_subdiv_vert_index, struct GPUVertBuf *pos_nor); +void draw_subdiv_finalize_custom_normals(const DRWSubdivCache *cache, + GPUVertBuf *src_custom_normals, + GPUVertBuf *pos_nor); + void draw_subdiv_extract_pos_nor(const DRWSubdivCache *cache, struct GPUVertBuf *pos_nor, bool do_limit_normals); |