diff options
author | YimingWu <xp8110@outlook.com> | 2021-06-28 17:26:23 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2021-06-28 17:26:23 +0300 |
commit | cf21ba37efafbedc9e5d7f8624ce82370fe17a62 (patch) | |
tree | 4691123ee5fc43e8935b51c793d7e9b7b1aea9ec /source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h | |
parent | 9c6a382f9540c8e334a16b7740b5ba6bb294fca9 (diff) |
LineArt: Occlusion effectiveness support
This patch adds a function where you can specify occlusion effectiveness from 0 to 255 layers per face for a given mesh material.
Reviewed By: Sebastian Parborg (zeddb)
Ref D11308
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, 8 insertions, 12 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h index d78cd862383..090c9d0f8fc 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h +++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h @@ -53,7 +53,8 @@ typedef struct LineartTriangle { double gn[3]; /* Material flag is removed to save space. */ - unsigned char transparency_mask; + unsigned char material_mask_bits; + unsigned char mat_occlusion; unsigned char flags; /* #eLineartTriangleFlags */ /** @@ -101,13 +102,8 @@ typedef struct LineartEdgeSegment { /** Occlusion level after "at" point */ unsigned char occlusion; - /** - * For determining lines behind a glass window material. - * the size of this variable should also be dynamically decided, 1 byte to 8 byte, - * allows 8 to 64 materials for "transparent mask". 1 byte (8 materials) should be - * enough for most cases. - */ - unsigned char transparency_mask; + /* Used to filter line art occlusion edges */ + unsigned char material_mask_bits; } LineartEdgeSegment; typedef struct LineartVert { @@ -177,7 +173,7 @@ typedef struct LineartEdgeChain { /** Chain now only contains one type of segments */ int type; - unsigned char transparency_mask; + unsigned char material_mask_bits; struct Object *object_ref; } LineartEdgeChain; @@ -191,7 +187,7 @@ typedef struct LineartEdgeChainItem { float normal[3]; unsigned char line_type; char occlusion; - unsigned char transparency_mask; + unsigned char material_mask_bits; size_t index; } LineartEdgeChainItem; @@ -616,8 +612,8 @@ void MOD_lineart_gpencil_generate(LineartCache *cache, int level_end, int mat_nr, short edge_types, - unsigned char transparency_flags, - unsigned char transparency_mask, + unsigned char material_mask_flags, + unsigned char material_mask_bits, short thickness, float opacity, const char *source_vgname, |