/
ShadowSetting.ts
81 lines (78 loc) · 1.68 KB
/
ShadowSetting.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/**
* Shadow setting
* @group Setting
*/
export type ShadowSetting = {
debug: any,
/**
* enable
*/
enable: boolean;
/**
*
*/
needUpdate: boolean;
/**
* update shadown automatic
*/
autoUpdate: boolean;
/**
* frequency for shadows update
*/
updateFrameRate: number;
/**
* Percentage-Closer Filtering(PCF)is a simple, often seen technique for removing shadow edges.
* Soft shadow, is a soft and blurred shadow that is farther away from the object when the light is shot down.
* Hard shadow, is a sharper shadow, at the exchange (connection) with the object or the place where the light hits and close to the object,
or the occluded place where the sunlight cannot reach.
*/
type: `PCF` | `HARD` | `SOFT`;
/**
* Offset of point light shadow
*/
pointShadowBias: number;
// /**
// * Shadow quality
// */
// shadowQuality: number;
/**
* shadow boundary
*/
shadowBound?: number;
/**
* shadow mapping Size
*/
shadowSize: number;
/**
* shadow depth offset bias
*/
shadowBias: number;
/**
* Shadow softness
*/
shadowSoft: number;
/**
* Point shadow mapping size
*/
pointShadowSize: number;
/**
* Blend Shadow(0-1)
*/
csmMargin: number;
/**
* scattering csm Area Exponent for each level
*/
csmScatteringExp: number;
/**
* scale csm Area of all level
*/
csmAreaScale: number;
// /**
// * Shadow near section
// */
// shadowNear: number;
// /**
// * Shadow Far Section
// */
// shadowFar: number;
};