tree sway and shadow improvements
[WindSway-HDRP.git] / Library / PackageCache / com.unity.postprocessing@2.1.2 / PostProcessing / Shaders / Builtins / DiskKernels.hlsl
blobb817ce852ed0fa8ca5733c9d054e6291694df992
1 #ifndef UNITY_POSTFX_DISK_KERNELS
2 #define UNITY_POSTFX_DISK_KERNELS
4 #if !defined(KERNEL_SMALL) && !defined(KERNEL_MEDIUM) && \
5     !defined(KERNEL_LARGE) && !defined(KERNEL_VERYLARGE)
7 static const int kSampleCount = 1;
8 static const float2 kDiskKernel[1] = { float2(0, 0) };
10 #endif
12 #if defined(KERNEL_SMALL)
14 // rings = 2
15 // points per ring = 5
16 static const int kSampleCount = 16;
17 static const float2 kDiskKernel[kSampleCount] = {
18     float2(0,0),
19     float2(0.54545456,0),
20     float2(0.16855472,0.5187581),
21     float2(-0.44128203,0.3206101),
22     float2(-0.44128197,-0.3206102),
23     float2(0.1685548,-0.5187581),
24     float2(1,0),
25     float2(0.809017,0.58778524),
26     float2(0.30901697,0.95105654),
27     float2(-0.30901703,0.9510565),
28     float2(-0.80901706,0.5877852),
29     float2(-1,0),
30     float2(-0.80901694,-0.58778536),
31     float2(-0.30901664,-0.9510566),
32     float2(0.30901712,-0.9510565),
33     float2(0.80901694,-0.5877853),
36 #endif
38 #if defined(KERNEL_MEDIUM)
40 // rings = 3
41 // points per ring = 7
42 static const int kSampleCount = 22;
43 static const float2 kDiskKernel[kSampleCount] = {
44     float2(0,0),
45     float2(0.53333336,0),
46     float2(0.3325279,0.4169768),
47     float2(-0.11867785,0.5199616),
48     float2(-0.48051673,0.2314047),
49     float2(-0.48051673,-0.23140468),
50     float2(-0.11867763,-0.51996166),
51     float2(0.33252785,-0.4169769),
52     float2(1,0),
53     float2(0.90096885,0.43388376),
54     float2(0.6234898,0.7818315),
55     float2(0.22252098,0.9749279),
56     float2(-0.22252095,0.9749279),
57     float2(-0.62349,0.7818314),
58     float2(-0.90096885,0.43388382),
59     float2(-1,0),
60     float2(-0.90096885,-0.43388376),
61     float2(-0.6234896,-0.7818316),
62     float2(-0.22252055,-0.974928),
63     float2(0.2225215,-0.9749278),
64     float2(0.6234897,-0.7818316),
65     float2(0.90096885,-0.43388376),
68 #endif
70 #if defined(KERNEL_LARGE)
72 // rings = 4
73 // points per ring = 7
74 static const int kSampleCount = 43;
75 static const float2 kDiskKernel[kSampleCount] = {
76     float2(0,0),
77     float2(0.36363637,0),
78     float2(0.22672357,0.28430238),
79     float2(-0.08091671,0.35451925),
80     float2(-0.32762504,0.15777594),
81     float2(-0.32762504,-0.15777591),
82     float2(-0.08091656,-0.35451928),
83     float2(0.22672352,-0.2843024),
84     float2(0.6818182,0),
85     float2(0.614297,0.29582983),
86     float2(0.42510667,0.5330669),
87     float2(0.15171885,0.6647236),
88     float2(-0.15171883,0.6647236),
89     float2(-0.4251068,0.53306687),
90     float2(-0.614297,0.29582986),
91     float2(-0.6818182,0),
92     float2(-0.614297,-0.29582983),
93     float2(-0.42510656,-0.53306705),
94     float2(-0.15171856,-0.66472363),
95     float2(0.1517192,-0.6647235),
96     float2(0.4251066,-0.53306705),
97     float2(0.614297,-0.29582983),
98     float2(1,0),
99     float2(0.9555728,0.2947552),
100     float2(0.82623875,0.5633201),
101     float2(0.6234898,0.7818315),
102     float2(0.36534098,0.93087375),
103     float2(0.07473,0.9972038),
104     float2(-0.22252095,0.9749279),
105     float2(-0.50000006,0.8660254),
106     float2(-0.73305196,0.6801727),
107     float2(-0.90096885,0.43388382),
108     float2(-0.98883086,0.14904208),
109     float2(-0.9888308,-0.14904249),
110     float2(-0.90096885,-0.43388376),
111     float2(-0.73305184,-0.6801728),
112     float2(-0.4999999,-0.86602545),
113     float2(-0.222521,-0.9749279),
114     float2(0.07473029,-0.99720377),
115     float2(0.36534148,-0.9308736),
116     float2(0.6234897,-0.7818316),
117     float2(0.8262388,-0.56332),
118     float2(0.9555729,-0.29475483),
121 #endif
123 #if defined(KERNEL_VERYLARGE)
125 // rings = 5
126 // points per ring = 7
127 static const int kSampleCount = 71;
128 static const float2 kDiskKernel[kSampleCount] = {
129     float2(0,0),
130     float2(0.2758621,0),
131     float2(0.1719972,0.21567768),
132     float2(-0.061385095,0.26894566),
133     float2(-0.24854316,0.1196921),
134     float2(-0.24854316,-0.11969208),
135     float2(-0.061384983,-0.2689457),
136     float2(0.17199717,-0.21567771),
137     float2(0.51724136,0),
138     float2(0.46601835,0.22442262),
139     float2(0.32249472,0.40439558),
140     float2(0.11509705,0.50427306),
141     float2(-0.11509704,0.50427306),
142     float2(-0.3224948,0.40439552),
143     float2(-0.46601835,0.22442265),
144     float2(-0.51724136,0),
145     float2(-0.46601835,-0.22442262),
146     float2(-0.32249463,-0.40439564),
147     float2(-0.11509683,-0.5042731),
148     float2(0.11509732,-0.504273),
149     float2(0.32249466,-0.40439564),
150     float2(0.46601835,-0.22442262),
151     float2(0.7586207,0),
152     float2(0.7249173,0.22360738),
153     float2(0.6268018,0.4273463),
154     float2(0.47299224,0.59311354),
155     float2(0.27715522,0.7061801),
156     float2(0.056691725,0.75649947),
157     float2(-0.168809,0.7396005),
158     float2(-0.3793104,0.65698475),
159     float2(-0.55610836,0.51599306),
160     float2(-0.6834936,0.32915324),
161     float2(-0.7501475,0.113066405),
162     float2(-0.7501475,-0.11306671),
163     float2(-0.6834936,-0.32915318),
164     float2(-0.5561083,-0.5159932),
165     float2(-0.37931028,-0.6569848),
166     float2(-0.16880904,-0.7396005),
167     float2(0.056691945,-0.7564994),
168     float2(0.2771556,-0.7061799),
169     float2(0.47299215,-0.59311366),
170     float2(0.62680185,-0.4273462),
171     float2(0.72491735,-0.22360711),
172     float2(1,0),
173     float2(0.9749279,0.22252093),
174     float2(0.90096885,0.43388376),
175     float2(0.7818315,0.6234898),
176     float2(0.6234898,0.7818315),
177     float2(0.43388364,0.9009689),
178     float2(0.22252098,0.9749279),
179     float2(0,1),
180     float2(-0.22252095,0.9749279),
181     float2(-0.43388385,0.90096885),
182     float2(-0.62349,0.7818314),
183     float2(-0.7818317,0.62348956),
184     float2(-0.90096885,0.43388382),
185     float2(-0.9749279,0.22252093),
186     float2(-1,0),
187     float2(-0.9749279,-0.22252087),
188     float2(-0.90096885,-0.43388376),
189     float2(-0.7818314,-0.6234899),
190     float2(-0.6234896,-0.7818316),
191     float2(-0.43388346,-0.900969),
192     float2(-0.22252055,-0.974928),
193     float2(0,-1),
194     float2(0.2225215,-0.9749278),
195     float2(0.4338835,-0.90096897),
196     float2(0.6234897,-0.7818316),
197     float2(0.78183144,-0.62348986),
198     float2(0.90096885,-0.43388376),
199     float2(0.9749279,-0.22252086),
202 #endif
204 #endif // UNITY_POSTFX_DISK_KERNELS