Refactor shadow generation

Trying to make the code easier to understand. The logic is unchanged.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-01-01 00:15:51 +00:00
parent edb1139507
commit 4aeffa36b8
6 changed files with 298 additions and 330 deletions

View File

@ -531,12 +531,8 @@ typedef struct session {
/// Gaussian map of shadow.
conv *gaussian_map;
// for shadow precomputation
/// Shadow depth on one side.
int cgsize;
/// Pre-computed color table for corners of shadow.
unsigned char *shadow_corner;
/// Pre-computed color table for a side of shadow.
unsigned char *shadow_top;
/// Pre-computed table for shadow.
double *shadow_sum;
/// A region in which shadow is not painted on.
region_t shadow_exclude_reg;