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
This commit is contained in:
2022-06-29 22:54:29 +08:00
parent 2ac5b55289
commit 6dd8ceef2a
26 changed files with 2782 additions and 345 deletions

View File

@@ -316,6 +316,27 @@ MINLINE void swap_v4_v4(float a[4], float b[4])
SWAP(float, a[3], b[3]);
}
MINLINE void swap_v2_v2_db(double a[2], double b[2])
{
SWAP(double, a[0], b[0]);
SWAP(double, a[1], b[1]);
}
MINLINE void swap_v3_v3_db(double a[3], double b[3])
{
SWAP(double, a[0], b[0]);
SWAP(double, a[1], b[1]);
SWAP(double, a[2], b[2]);
}
MINLINE void swap_v4_v4_db(double a[4], double b[4])
{
SWAP(double, a[0], b[0]);
SWAP(double, a[1], b[1]);
SWAP(double, a[2], b[2]);
SWAP(double, a[3], b[3]);
}
/* float args -> vec */
MINLINE void copy_v2_fl2(float v[2], float x, float y)