diff options
Diffstat (limited to 'source/blender/blenkernel/intern/subdiv_inline.h')
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_inline.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_inline.h b/source/blender/blenkernel/intern/subdiv_inline.h index f00c5cf7ff7..a51a33feb3d 100644 --- a/source/blender/blenkernel/intern/subdiv_inline.h +++ b/source/blender/blenkernel/intern/subdiv_inline.h @@ -104,4 +104,15 @@ BLI_INLINE void BKE_subdiv_rotate_grid_to_quad( } } +BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_f(float edge_crease) +{ + return edge_crease * edge_crease * 10.0f; +} + +BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_char(char edge_crease) +{ + const float edge_crease_f = edge_crease / 255.0f; + return BKE_subdiv_edge_crease_to_sharpness_f(edge_crease_f); +} + #endif /* __SUBDIV_INLINE_H__ */ |