diff options
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h index 5dd833fb12b..22037d10a71 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h +++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h @@ -84,6 +84,7 @@ typedef struct LineartElementLinkNode { /* For edge element link nodes, used for shadow edge matching. */ int obindex; + int global_index_offset; /** Per object value, always set, if not enabled by #ObjectLineArt, then it's set to global. */ float crease_threshold; @@ -205,6 +206,10 @@ typedef struct LineartEdgeChain { uint8_t intersection_mask; uint32_t shadow_mask_bits; + /* We need local index for correct weight transfer, line art index is global, thus + * local_index=lineart_index-index_offset. */ + uint32_t index_offset; + struct Object *object_ref; struct Object *silhouette_backdrop; } LineartEdgeChain; @@ -366,8 +371,9 @@ typedef struct LineartData { /* Keep an copy of these data so when line art is running it's self-contained. */ bool cam_is_persp; - bool cam_is_persp_secondary; /* "Secondary" ones are from viewing camera (as opposed to shadow - camera), during shadow calculation. */ + /* "Secondary" ones are from viewing camera + * (as opposed to shadow camera), during shadow calculation. */ + bool cam_is_persp_secondary; float cam_obmat[4][4]; float cam_obmat_secondary[4][4]; double camera_pos[3]; @@ -436,15 +442,21 @@ typedef enum eLineartTriangleFlags { LRT_TRIANGLE_INTERSECTION_ONLY = (1 << 3), LRT_TRIANGLE_NO_INTERSECTION = (1 << 4), LRT_TRIANGLE_MAT_BACK_FACE_CULLING = (1 << 5), + LRT_TRIANGLE_FORCE_INTERSECTION = (1 << 6), } eLineartTriangleFlags; #define LRT_SHADOW_MASK_UNDEFINED 0 -#define LRT_SHADOW_MASK_LIT (1 << 0) +#define LRT_SHADOW_MASK_ILLUMINATED (1 << 0) #define LRT_SHADOW_MASK_SHADED (1 << 1) #define LRT_SHADOW_MASK_ENCLOSED_SHAPE (1 << 2) #define LRT_SHADOW_MASK_INHIBITED (1 << 3) #define LRT_SHADOW_SILHOUETTE_ERASED_GROUP (1 << 4) #define LRT_SHADOW_SILHOUETTE_ERASED_OBJECT (1 << 5) +#define LRT_SHADOW_MASK_ILLUMINATED_SHAPE (1 << 6) + +#define LRT_SHADOW_TEST_SHAPE_BITS \ + (LRT_SHADOW_MASK_ILLUMINATED | LRT_SHADOW_MASK_SHADED | LRT_SHADOW_MASK_INHIBITED | \ + LRT_SHADOW_MASK_ILLUMINATED_SHAPE) /** * Controls how many edges a worker thread is processing at one request. @@ -477,6 +489,7 @@ typedef struct LineartRenderTaskInfo { typedef struct LineartObjectInfo { struct LineartObjectInfo *next; struct Object *original_ob; + struct Object *original_ob_eval; /* For evaluated materials */ struct Mesh *original_me; double model_view_proj[4][4]; double model_view[4][4]; @@ -858,6 +871,7 @@ void MOD_lineart_chain_find_silhouette_backdrop_objects(LineartData *ld); int MOD_lineart_chain_count(const LineartEdgeChain *ec); void MOD_lineart_chain_clear_picked_flag(LineartCache *lc); +void MOD_lineart_finalize_chains(LineartData *ld); /** * This is the entry point of all line art calculations. |