diff options
author | Yiming Wu <xp8110@outlook.com> | 2022-06-29 17:54:29 +0300 |
---|---|---|
committer | Yiming Wu <xp8110@outlook.com> | 2022-06-29 17:54:29 +0300 |
commit | 6dd8ceef2a21f64cbb61a96560c50c162f9dae39 (patch) | |
tree | dff82af871b36d7df37213cdcc2a94dfd1ca70b2 /source/blender/makesdna/DNA_lineart_types.h | |
parent | 2ac5b55289d361de7fccc9be188b98df358ab932 (diff) |
LineArt: Shadow and related functionalities.
This patch includes the full shadow functionality for LineArt:
- Light contour and cast shadow lines.
- Lit/shaded region selection.
- Enclosed light/shadow shape calculation.
- Silhouette/anti-silhouette selection.
- Intersection priority based on shadow edge identifier.
Reviewed By: Sebastian Parborg (zeddb)
Differential Revision: https://developer.blender.org/D15109
Diffstat (limited to 'source/blender/makesdna/DNA_lineart_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_lineart_types.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/source/blender/makesdna/DNA_lineart_types.h b/source/blender/makesdna/DNA_lineart_types.h index 444a0e6f247..4f736703203 100644 --- a/source/blender/makesdna/DNA_lineart_types.h +++ b/source/blender/makesdna/DNA_lineart_types.h @@ -38,6 +38,8 @@ typedef enum eLineartMainFlags { LRT_USE_BACK_FACE_CULLING = (1 << 19), LRT_USE_IMAGE_BOUNDARY_TRIMMING = (1 << 20), LRT_CHAIN_PRESERVE_DETAILS = (1 << 22), + LRT_SHADOW_ENCLOSED_SHAPES = (1 << 23), + LRT_SHADOW_USE_SILHOUETTE = (1 << 24), } eLineartMainFlags; typedef enum eLineartEdgeFlag { @@ -47,14 +49,19 @@ typedef enum eLineartEdgeFlag { LRT_EDGE_FLAG_MATERIAL = (1 << 3), LRT_EDGE_FLAG_INTERSECTION = (1 << 4), LRT_EDGE_FLAG_LOOSE = (1 << 5), + LRT_EDGE_FLAG_LIGHT_CONTOUR = (1 << 6), /* LRT_EDGE_FLAG_FOR_FUTURE = (1 << 7), */ - /** - * It's a legacy limit of 8 bits for feature lines that come from original mesh edges. It should - * not be needed in current object loading scheme, but might still be relevant if we are to - * implement edit-mesh loading, so don't exceed 8 bits just yet. - */ - LRT_EDGE_FLAG_CHAIN_PICKED = (1 << 8), - LRT_EDGE_FLAG_CLIPPED = (1 << 9), + /* It's a legacy limit of 8 bits for feature lines that come from original mesh edges. It should + not be needed in current object loading scheme, but might still be relevant if we are to + impelment EditMesh loading, so don't exceed 8 bits just yet. */ + LRT_EDGE_FLAG_PROJECTED_SHADOW = (1 << 8), + /* To determine an edge to be occluded from the front or back face it's lying on. */ + LRT_EDGE_FLAG_SHADOW_FACING_LIGHT = (1 << 9), + /** Also used as discarded line mark. */ + LRT_EDGE_FLAG_CHAIN_PICKED = (1 << 10), + LRT_EDGE_FLAG_CLIPPED = (1 << 11), + /** Used to specify contor from viewing camera when computing shadows. */ + LRT_EDGE_FLAG_CONTOUR_SECONDARY = (1 << 12), /** Limited to 16 bits for the entire thing. */ /** For object loading code to use only. */ @@ -63,4 +70,6 @@ typedef enum eLineartEdgeFlag { LRT_EDGE_FLAG_NEXT_IS_DUPLICATION = (1 << 15), } eLineartEdgeFlag; -#define LRT_EDGE_FLAG_ALL_TYPE 0x3f +#define LRT_EDGE_FLAG_ALL_TYPE 0x01ff +#define LRT_EDGE_FLAG_INIT_TYPE 0x37 /* Without material & light contour */ +#define LRT_EDGE_FLAG_TYPE_MAX_BITS 7 |