Initial Grease Pencil 3.0 stage #106848

Merged
Falk David merged 224 commits from filedescriptor/blender:grease-pencil-v3 into main 2023-05-30 11:14:22 +02:00
1 changed files with 12 additions and 1 deletions
Showing only changes of commit 79498b8740 - Show all commits

View File

@ -1330,8 +1330,19 @@ void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrAr
#define OVERLAY_RETOPOLOGY_ENABLED(overlay) \
(((overlay).edit_flag & V3D_OVERLAY_EDIT_RETOPOLOGY) != 0)
#if __APPLE__
/* Apple silicon tile depth test requires a higher value to reduce drawing artifacts.*/
# define OVERLAY_RETOPOLOGY_MIN_OFFSET_ENABLED 0.0015f
# define OVERLAY_RETOPOLOGY_MIN_OFFSET_DISABLED 0.0015f
#else
# define OVERLAY_RETOPOLOGY_MIN_OFFSET_ENABLED FLT_EPSILON
# define OVERLAY_RETOPOLOGY_MIN_OFFSET_DISABLED 0.0f
#endif
#define OVERLAY_RETOPOLOGY_OFFSET(overlay) \
(OVERLAY_RETOPOLOGY_ENABLED(overlay) ? max_ff((overlay).retopology_offset, FLT_EPSILON) : 0.0f)
(OVERLAY_RETOPOLOGY_ENABLED(overlay) ? \
max_ff((overlay).retopology_offset, OVERLAY_RETOPOLOGY_MIN_OFFSET_ENABLED) : \
OVERLAY_RETOPOLOGY_MIN_OFFSET_DISABLED)
#define RETOPOLOGY_ENABLED(v3d) (OVERLAY_RETOPOLOGY_ENABLED((v3d)->overlay))
#define RETOPOLOGY_OFFSET(v3d) (OVERLAY_RETOPOLOGY_OFFSET((v3d)->overlay))