forked from AtomicGameEngine/AtomicGameEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLight.cs
More file actions
114 lines (89 loc) · 3.59 KB
/
Light.cs
File metadata and controls
114 lines (89 loc) · 3.59 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
using System;
using System.Runtime.InteropServices;
namespace AtomicEngine
{
public partial class Light : Drawable
{
public BiasParameters ShadowBias
{
get
{
return GetShadowBias();
}
set
{
SetShadowBias(value);
}
}
public CascadeParameters ShadowCascade
{
get
{
return GetShadowCascade();
}
set
{
SetShadowCascade(value);
}
}
public FocusParameters ShadowFocus
{
get
{
return GetShadowFocus();
}
set
{
SetShadowFocus(value);
}
}
/// Set shadow depth bias parameters.
public void SetShadowBias(BiasParameters parameters)
{
csi_Atomic_Light_SetShadowBias(nativeInstance, ref parameters);
}
[DllImport(Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csi_Atomic_Light_SetShadowBias(IntPtr self, ref BiasParameters parameters);
/// Set directional light cascaded shadow parameters.
void SetShadowCascade(CascadeParameters parameters)
{
csi_Atomic_Light_SetShadowCascade(nativeInstance, ref parameters);
}
[DllImport(Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csi_Atomic_Light_SetShadowCascade(IntPtr self, ref CascadeParameters parameters);
/// Set shadow map focusing parameters.
void SetShadowFocus(FocusParameters parameters)
{
csi_Atomic_Light_SetShadowFocus(nativeInstance, ref parameters);
}
[DllImport(Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csi_Atomic_Light_SetShadowFocus(IntPtr self, ref FocusParameters parameters);
/// Set shadow depth bias parameters.
BiasParameters GetShadowBias()
{
BiasParameters biasParams = new BiasParameters();
csi_Atomic_Light_GetShadowBias(nativeInstance, ref biasParams);
return biasParams;
}
[DllImport(Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csi_Atomic_Light_GetShadowBias(IntPtr self, ref BiasParameters retValue);
/// Set directional light cascaded shadow parameters.
CascadeParameters GetShadowCascade()
{
CascadeParameters cascadeParams = new CascadeParameters();
csi_Atomic_Light_GetShadowCascade(nativeInstance, ref cascadeParams);
return cascadeParams;
}
[DllImport(Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csi_Atomic_Light_GetShadowCascade(IntPtr self, ref CascadeParameters retValue);
/// Set shadow map focusing parameters.
FocusParameters GetShadowFocus()
{
FocusParameters focusParams = new FocusParameters();
csi_Atomic_Light_GetShadowFocus(nativeInstance, ref focusParams);
return focusParams;
}
[DllImport(Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern void csi_Atomic_Light_GetShadowFocus(IntPtr self, ref FocusParameters retValue);
};
}