forked from yaoya/ScriptableRenderLoop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdditionalLightData.cs
More file actions
46 lines (35 loc) · 1.31 KB
/
Copy pathAdditionalLightData.cs
File metadata and controls
46 lines (35 loc) · 1.31 KB
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
namespace UnityEngine.Experimental.Rendering
{
public enum LightArchetype {Punctual, Rectangle, Line};
//@TODO: We should continuously move these values
// into the engine when we can see them being generally useful
[RequireComponent(typeof(Light))]
public class AdditionalLightData : MonoBehaviour
{
public const int DefaultShadowResolution = 512;
public int shadowResolution = DefaultShadowResolution;
public static int GetShadowResolution(AdditionalLightData lightData)
{
if (lightData != null)
return lightData.shadowResolution;
else
return DefaultShadowResolution;
}
[Range(0.0F, 100.0F)]
private float m_innerSpotPercent = 0.0F;
public float GetInnerSpotPercent01()
{
return Mathf.Clamp(m_innerSpotPercent, 0.0f, 100.0f) / 100.0f;
}
[Range(0.0F, 1.0F)]
public float shadowDimmer = 1.0f;
public bool affectDiffuse = true;
public bool affectSpecular = true;
public LightArchetype archetype = LightArchetype.Punctual;
public bool isDoubleSided = false;
[Range(0.0f, 20.0f)]
public float areaLightLength = 0.0f;
[Range(0.0f, 20.0f)]
public float areaLightWidth = 0.0f;
}
}