• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3
4using namespace metal;
5
6struct type_View
7{
8    float4x4 View_TranslatedWorldToClip;
9    float4x4 View_WorldToClip;
10    float4x4 View_TranslatedWorldToView;
11    float4x4 View_ViewToTranslatedWorld;
12    float4x4 View_TranslatedWorldToCameraView;
13    float4x4 View_CameraViewToTranslatedWorld;
14    float4x4 View_ViewToClip;
15    float4x4 View_ViewToClipNoAA;
16    float4x4 View_ClipToView;
17    float4x4 View_ClipToTranslatedWorld;
18    float4x4 View_SVPositionToTranslatedWorld;
19    float4x4 View_ScreenToWorld;
20    float4x4 View_ScreenToTranslatedWorld;
21    packed_float3 View_ViewForward;
22    float PrePadding_View_844;
23    packed_float3 View_ViewUp;
24    float PrePadding_View_860;
25    packed_float3 View_ViewRight;
26    float PrePadding_View_876;
27    packed_float3 View_HMDViewNoRollUp;
28    float PrePadding_View_892;
29    packed_float3 View_HMDViewNoRollRight;
30    float PrePadding_View_908;
31    float4 View_InvDeviceZToWorldZTransform;
32    float4 View_ScreenPositionScaleBias;
33    packed_float3 View_WorldCameraOrigin;
34    float PrePadding_View_956;
35    packed_float3 View_TranslatedWorldCameraOrigin;
36    float PrePadding_View_972;
37    packed_float3 View_WorldViewOrigin;
38    float PrePadding_View_988;
39    packed_float3 View_PreViewTranslation;
40    float PrePadding_View_1004;
41    float4x4 View_PrevProjection;
42    float4x4 View_PrevViewProj;
43    float4x4 View_PrevViewRotationProj;
44    float4x4 View_PrevViewToClip;
45    float4x4 View_PrevClipToView;
46    float4x4 View_PrevTranslatedWorldToClip;
47    float4x4 View_PrevTranslatedWorldToView;
48    float4x4 View_PrevViewToTranslatedWorld;
49    float4x4 View_PrevTranslatedWorldToCameraView;
50    float4x4 View_PrevCameraViewToTranslatedWorld;
51    packed_float3 View_PrevWorldCameraOrigin;
52    float PrePadding_View_1660;
53    packed_float3 View_PrevWorldViewOrigin;
54    float PrePadding_View_1676;
55    packed_float3 View_PrevPreViewTranslation;
56    float PrePadding_View_1692;
57    float4x4 View_PrevInvViewProj;
58    float4x4 View_PrevScreenToTranslatedWorld;
59    float4x4 View_ClipToPrevClip;
60    float4 View_TemporalAAJitter;
61    float4 View_GlobalClippingPlane;
62    float2 View_FieldOfViewWideAngles;
63    float2 View_PrevFieldOfViewWideAngles;
64    float4 View_ViewRectMin;
65    float4 View_ViewSizeAndInvSize;
66    float4 View_BufferSizeAndInvSize;
67    float4 View_BufferBilinearUVMinMax;
68    int View_NumSceneColorMSAASamples;
69    float View_PreExposure;
70    float View_OneOverPreExposure;
71    float PrePadding_View_2012;
72    float4 View_DiffuseOverrideParameter;
73    float4 View_SpecularOverrideParameter;
74    float4 View_NormalOverrideParameter;
75    float2 View_RoughnessOverrideParameter;
76    float View_PrevFrameGameTime;
77    float View_PrevFrameRealTime;
78    float View_OutOfBoundsMask;
79    float PrePadding_View_2084;
80    float PrePadding_View_2088;
81    float PrePadding_View_2092;
82    packed_float3 View_WorldCameraMovementSinceLastFrame;
83    float View_CullingSign;
84    float View_NearPlane;
85    float View_AdaptiveTessellationFactor;
86    float View_GameTime;
87    float View_RealTime;
88    float View_DeltaTime;
89    float View_MaterialTextureMipBias;
90    float View_MaterialTextureDerivativeMultiply;
91    uint View_Random;
92    uint View_FrameNumber;
93    uint View_StateFrameIndexMod8;
94    uint View_StateFrameIndex;
95    float View_CameraCut;
96    float View_UnlitViewmodeMask;
97    float PrePadding_View_2164;
98    float PrePadding_View_2168;
99    float PrePadding_View_2172;
100    float4 View_DirectionalLightColor;
101    packed_float3 View_DirectionalLightDirection;
102    float PrePadding_View_2204;
103    float4 View_TranslucencyLightingVolumeMin[2];
104    float4 View_TranslucencyLightingVolumeInvSize[2];
105    float4 View_TemporalAAParams;
106    float4 View_CircleDOFParams;
107    float View_DepthOfFieldSensorWidth;
108    float View_DepthOfFieldFocalDistance;
109    float View_DepthOfFieldScale;
110    float View_DepthOfFieldFocalLength;
111    float View_DepthOfFieldFocalRegion;
112    float View_DepthOfFieldNearTransitionRegion;
113    float View_DepthOfFieldFarTransitionRegion;
114    float View_MotionBlurNormalizedToPixel;
115    float View_bSubsurfacePostprocessEnabled;
116    float View_GeneralPurposeTweak;
117    float View_DemosaicVposOffset;
118    float PrePadding_View_2348;
119    packed_float3 View_IndirectLightingColorScale;
120    float View_HDR32bppEncodingMode;
121    packed_float3 View_AtmosphericFogSunDirection;
122    float View_AtmosphericFogSunPower;
123    float View_AtmosphericFogPower;
124    float View_AtmosphericFogDensityScale;
125    float View_AtmosphericFogDensityOffset;
126    float View_AtmosphericFogGroundOffset;
127    float View_AtmosphericFogDistanceScale;
128    float View_AtmosphericFogAltitudeScale;
129    float View_AtmosphericFogHeightScaleRayleigh;
130    float View_AtmosphericFogStartDistance;
131    float View_AtmosphericFogDistanceOffset;
132    float View_AtmosphericFogSunDiscScale;
133    uint View_AtmosphericFogRenderMask;
134    uint View_AtmosphericFogInscatterAltitudeSampleNum;
135    float4 View_AtmosphericFogSunColor;
136    packed_float3 View_NormalCurvatureToRoughnessScaleBias;
137    float View_RenderingReflectionCaptureMask;
138    float4 View_AmbientCubemapTint;
139    float View_AmbientCubemapIntensity;
140    float View_SkyLightParameters;
141    float PrePadding_View_2488;
142    float PrePadding_View_2492;
143    float4 View_SkyLightColor;
144    float4 View_SkyIrradianceEnvironmentMap[7];
145    float View_MobilePreviewMode;
146    float View_HMDEyePaddingOffset;
147    float View_ReflectionCubemapMaxMip;
148    float View_ShowDecalsMask;
149    uint View_DistanceFieldAOSpecularOcclusionMode;
150    float View_IndirectCapsuleSelfShadowingIntensity;
151    float PrePadding_View_2648;
152    float PrePadding_View_2652;
153    packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight;
154    int View_StereoPassIndex;
155    float4 View_GlobalVolumeCenterAndExtent[4];
156    float4 View_GlobalVolumeWorldToUVAddAndMul[4];
157    float View_GlobalVolumeDimension;
158    float View_GlobalVolumeTexelSize;
159    float View_MaxGlobalDistance;
160    float View_bCheckerboardSubsurfaceProfileRendering;
161    packed_float3 View_VolumetricFogInvGridSize;
162    float PrePadding_View_2828;
163    packed_float3 View_VolumetricFogGridZParams;
164    float PrePadding_View_2844;
165    float2 View_VolumetricFogSVPosToVolumeUV;
166    float View_VolumetricFogMaxDistance;
167    float PrePadding_View_2860;
168    packed_float3 View_VolumetricLightmapWorldToUVScale;
169    float PrePadding_View_2876;
170    packed_float3 View_VolumetricLightmapWorldToUVAdd;
171    float PrePadding_View_2892;
172    packed_float3 View_VolumetricLightmapIndirectionTextureSize;
173    float View_VolumetricLightmapBrickSize;
174    packed_float3 View_VolumetricLightmapBrickTexelSize;
175    float View_StereoIPD;
176    float View_IndirectLightingCacheShowFlag;
177    float View_EyeToPixelSpreadAngle;
178};
179
180struct type_StructuredBuffer_v4float
181{
182    float4 _m0[1];
183};
184
185struct type_TranslucentBasePass
186{
187    uint TranslucentBasePass_Shared_Forward_NumLocalLights;
188    uint TranslucentBasePass_Shared_Forward_NumReflectionCaptures;
189    uint TranslucentBasePass_Shared_Forward_HasDirectionalLight;
190    uint TranslucentBasePass_Shared_Forward_NumGridCells;
191    packed_int3 TranslucentBasePass_Shared_Forward_CulledGridSize;
192    uint TranslucentBasePass_Shared_Forward_MaxCulledLightsPerCell;
193    uint TranslucentBasePass_Shared_Forward_LightGridPixelSizeShift;
194    uint PrePadding_TranslucentBasePass_Shared_Forward_36;
195    uint PrePadding_TranslucentBasePass_Shared_Forward_40;
196    uint PrePadding_TranslucentBasePass_Shared_Forward_44;
197    packed_float3 TranslucentBasePass_Shared_Forward_LightGridZParams;
198    float PrePadding_TranslucentBasePass_Shared_Forward_60;
199    packed_float3 TranslucentBasePass_Shared_Forward_DirectionalLightDirection;
200    float PrePadding_TranslucentBasePass_Shared_Forward_76;
201    packed_float3 TranslucentBasePass_Shared_Forward_DirectionalLightColor;
202    float TranslucentBasePass_Shared_Forward_DirectionalLightVolumetricScatteringIntensity;
203    uint TranslucentBasePass_Shared_Forward_DirectionalLightShadowMapChannelMask;
204    uint PrePadding_TranslucentBasePass_Shared_Forward_100;
205    float2 TranslucentBasePass_Shared_Forward_DirectionalLightDistanceFadeMAD;
206    uint TranslucentBasePass_Shared_Forward_NumDirectionalLightCascades;
207    uint PrePadding_TranslucentBasePass_Shared_Forward_116;
208    uint PrePadding_TranslucentBasePass_Shared_Forward_120;
209    uint PrePadding_TranslucentBasePass_Shared_Forward_124;
210    float4 TranslucentBasePass_Shared_Forward_CascadeEndDepths;
211    float4x4 TranslucentBasePass_Shared_Forward_DirectionalLightWorldToShadowMatrix[4];
212    float4 TranslucentBasePass_Shared_Forward_DirectionalLightShadowmapMinMax[4];
213    float4 TranslucentBasePass_Shared_Forward_DirectionalLightShadowmapAtlasBufferSize;
214    float TranslucentBasePass_Shared_Forward_DirectionalLightDepthBias;
215    uint TranslucentBasePass_Shared_Forward_DirectionalLightUseStaticShadowing;
216    uint PrePadding_TranslucentBasePass_Shared_Forward_488;
217    uint PrePadding_TranslucentBasePass_Shared_Forward_492;
218    float4 TranslucentBasePass_Shared_Forward_DirectionalLightStaticShadowBufferSize;
219    float4x4 TranslucentBasePass_Shared_Forward_DirectionalLightWorldToStaticShadow;
220    float PrePadding_TranslucentBasePass_Shared_ForwardISR_576;
221    float PrePadding_TranslucentBasePass_Shared_ForwardISR_580;
222    float PrePadding_TranslucentBasePass_Shared_ForwardISR_584;
223    float PrePadding_TranslucentBasePass_Shared_ForwardISR_588;
224    float PrePadding_TranslucentBasePass_Shared_ForwardISR_592;
225    float PrePadding_TranslucentBasePass_Shared_ForwardISR_596;
226    float PrePadding_TranslucentBasePass_Shared_ForwardISR_600;
227    float PrePadding_TranslucentBasePass_Shared_ForwardISR_604;
228    float PrePadding_TranslucentBasePass_Shared_ForwardISR_608;
229    float PrePadding_TranslucentBasePass_Shared_ForwardISR_612;
230    float PrePadding_TranslucentBasePass_Shared_ForwardISR_616;
231    float PrePadding_TranslucentBasePass_Shared_ForwardISR_620;
232    float PrePadding_TranslucentBasePass_Shared_ForwardISR_624;
233    float PrePadding_TranslucentBasePass_Shared_ForwardISR_628;
234    float PrePadding_TranslucentBasePass_Shared_ForwardISR_632;
235    float PrePadding_TranslucentBasePass_Shared_ForwardISR_636;
236    uint TranslucentBasePass_Shared_ForwardISR_NumLocalLights;
237    uint TranslucentBasePass_Shared_ForwardISR_NumReflectionCaptures;
238    uint TranslucentBasePass_Shared_ForwardISR_HasDirectionalLight;
239    uint TranslucentBasePass_Shared_ForwardISR_NumGridCells;
240    packed_int3 TranslucentBasePass_Shared_ForwardISR_CulledGridSize;
241    uint TranslucentBasePass_Shared_ForwardISR_MaxCulledLightsPerCell;
242    uint TranslucentBasePass_Shared_ForwardISR_LightGridPixelSizeShift;
243    uint PrePadding_TranslucentBasePass_Shared_ForwardISR_676;
244    uint PrePadding_TranslucentBasePass_Shared_ForwardISR_680;
245    uint PrePadding_TranslucentBasePass_Shared_ForwardISR_684;
246    packed_float3 TranslucentBasePass_Shared_ForwardISR_LightGridZParams;
247    float PrePadding_TranslucentBasePass_Shared_ForwardISR_700;
248    packed_float3 TranslucentBasePass_Shared_ForwardISR_DirectionalLightDirection;
249    float PrePadding_TranslucentBasePass_Shared_ForwardISR_716;
250    packed_float3 TranslucentBasePass_Shared_ForwardISR_DirectionalLightColor;
251    float TranslucentBasePass_Shared_ForwardISR_DirectionalLightVolumetricScatteringIntensity;
252    uint TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowMapChannelMask;
253    uint PrePadding_TranslucentBasePass_Shared_ForwardISR_740;
254    float2 TranslucentBasePass_Shared_ForwardISR_DirectionalLightDistanceFadeMAD;
255    uint TranslucentBasePass_Shared_ForwardISR_NumDirectionalLightCascades;
256    uint PrePadding_TranslucentBasePass_Shared_ForwardISR_756;
257    uint PrePadding_TranslucentBasePass_Shared_ForwardISR_760;
258    uint PrePadding_TranslucentBasePass_Shared_ForwardISR_764;
259    float4 TranslucentBasePass_Shared_ForwardISR_CascadeEndDepths;
260    float4x4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightWorldToShadowMatrix[4];
261    float4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowmapMinMax[4];
262    float4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightShadowmapAtlasBufferSize;
263    float TranslucentBasePass_Shared_ForwardISR_DirectionalLightDepthBias;
264    uint TranslucentBasePass_Shared_ForwardISR_DirectionalLightUseStaticShadowing;
265    uint PrePadding_TranslucentBasePass_Shared_ForwardISR_1128;
266    uint PrePadding_TranslucentBasePass_Shared_ForwardISR_1132;
267    float4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightStaticShadowBufferSize;
268    float4x4 TranslucentBasePass_Shared_ForwardISR_DirectionalLightWorldToStaticShadow;
269    float PrePadding_TranslucentBasePass_Shared_Reflection_1216;
270    float PrePadding_TranslucentBasePass_Shared_Reflection_1220;
271    float PrePadding_TranslucentBasePass_Shared_Reflection_1224;
272    float PrePadding_TranslucentBasePass_Shared_Reflection_1228;
273    float PrePadding_TranslucentBasePass_Shared_Reflection_1232;
274    float PrePadding_TranslucentBasePass_Shared_Reflection_1236;
275    float PrePadding_TranslucentBasePass_Shared_Reflection_1240;
276    float PrePadding_TranslucentBasePass_Shared_Reflection_1244;
277    float PrePadding_TranslucentBasePass_Shared_Reflection_1248;
278    float PrePadding_TranslucentBasePass_Shared_Reflection_1252;
279    float PrePadding_TranslucentBasePass_Shared_Reflection_1256;
280    float PrePadding_TranslucentBasePass_Shared_Reflection_1260;
281    float PrePadding_TranslucentBasePass_Shared_Reflection_1264;
282    float PrePadding_TranslucentBasePass_Shared_Reflection_1268;
283    float PrePadding_TranslucentBasePass_Shared_Reflection_1272;
284    float PrePadding_TranslucentBasePass_Shared_Reflection_1276;
285    float4 TranslucentBasePass_Shared_Reflection_SkyLightParameters;
286    float TranslucentBasePass_Shared_Reflection_SkyLightCubemapBrightness;
287    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1300;
288    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1304;
289    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1308;
290    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1312;
291    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1316;
292    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1320;
293    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1324;
294    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1328;
295    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1332;
296    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1336;
297    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1340;
298    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1344;
299    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1348;
300    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1352;
301    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1356;
302    float4 TranslucentBasePass_Shared_PlanarReflection_ReflectionPlane;
303    float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionOrigin;
304    float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionXAxis;
305    float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionYAxis;
306    float3x4 TranslucentBasePass_Shared_PlanarReflection_InverseTransposeMirrorMatrix;
307    packed_float3 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionParameters;
308    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1484;
309    float2 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionParameters2;
310    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1496;
311    float PrePadding_TranslucentBasePass_Shared_PlanarReflection_1500;
312    float4x4 TranslucentBasePass_Shared_PlanarReflection_ProjectionWithExtraFOV[2];
313    float4 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionScreenScaleBias[2];
314    float2 TranslucentBasePass_Shared_PlanarReflection_PlanarReflectionScreenBound;
315    uint TranslucentBasePass_Shared_PlanarReflection_bIsStereo;
316    float PrePadding_TranslucentBasePass_Shared_Fog_1676;
317    float PrePadding_TranslucentBasePass_Shared_Fog_1680;
318    float PrePadding_TranslucentBasePass_Shared_Fog_1684;
319    float PrePadding_TranslucentBasePass_Shared_Fog_1688;
320    float PrePadding_TranslucentBasePass_Shared_Fog_1692;
321    float4 TranslucentBasePass_Shared_Fog_ExponentialFogParameters;
322    float4 TranslucentBasePass_Shared_Fog_ExponentialFogParameters2;
323    float4 TranslucentBasePass_Shared_Fog_ExponentialFogColorParameter;
324    float4 TranslucentBasePass_Shared_Fog_ExponentialFogParameters3;
325    float4 TranslucentBasePass_Shared_Fog_InscatteringLightDirection;
326    float4 TranslucentBasePass_Shared_Fog_DirectionalInscatteringColor;
327    float2 TranslucentBasePass_Shared_Fog_SinCosInscatteringColorCubemapRotation;
328    float PrePadding_TranslucentBasePass_Shared_Fog_1800;
329    float PrePadding_TranslucentBasePass_Shared_Fog_1804;
330    packed_float3 TranslucentBasePass_Shared_Fog_FogInscatteringTextureParameters;
331    float TranslucentBasePass_Shared_Fog_ApplyVolumetricFog;
332    float PrePadding_TranslucentBasePass_1824;
333    float PrePadding_TranslucentBasePass_1828;
334    float PrePadding_TranslucentBasePass_1832;
335    float PrePadding_TranslucentBasePass_1836;
336    float PrePadding_TranslucentBasePass_1840;
337    float PrePadding_TranslucentBasePass_1844;
338    float PrePadding_TranslucentBasePass_1848;
339    float PrePadding_TranslucentBasePass_1852;
340    float PrePadding_TranslucentBasePass_1856;
341    float PrePadding_TranslucentBasePass_1860;
342    float PrePadding_TranslucentBasePass_1864;
343    float PrePadding_TranslucentBasePass_1868;
344    float PrePadding_TranslucentBasePass_1872;
345    float PrePadding_TranslucentBasePass_1876;
346    float PrePadding_TranslucentBasePass_1880;
347    float PrePadding_TranslucentBasePass_1884;
348    float PrePadding_TranslucentBasePass_1888;
349    float PrePadding_TranslucentBasePass_1892;
350    float PrePadding_TranslucentBasePass_1896;
351    float PrePadding_TranslucentBasePass_1900;
352    float PrePadding_TranslucentBasePass_1904;
353    float PrePadding_TranslucentBasePass_1908;
354    float PrePadding_TranslucentBasePass_1912;
355    float PrePadding_TranslucentBasePass_1916;
356    float PrePadding_TranslucentBasePass_1920;
357    float PrePadding_TranslucentBasePass_1924;
358    float PrePadding_TranslucentBasePass_1928;
359    float PrePadding_TranslucentBasePass_1932;
360    float PrePadding_TranslucentBasePass_1936;
361    float PrePadding_TranslucentBasePass_1940;
362    float PrePadding_TranslucentBasePass_1944;
363    float PrePadding_TranslucentBasePass_1948;
364    float PrePadding_TranslucentBasePass_1952;
365    float PrePadding_TranslucentBasePass_1956;
366    float PrePadding_TranslucentBasePass_1960;
367    float PrePadding_TranslucentBasePass_1964;
368    float PrePadding_TranslucentBasePass_1968;
369    float PrePadding_TranslucentBasePass_1972;
370    float PrePadding_TranslucentBasePass_1976;
371    float PrePadding_TranslucentBasePass_1980;
372    float PrePadding_TranslucentBasePass_1984;
373    float PrePadding_TranslucentBasePass_1988;
374    float PrePadding_TranslucentBasePass_1992;
375    float PrePadding_TranslucentBasePass_1996;
376    float PrePadding_TranslucentBasePass_2000;
377    float PrePadding_TranslucentBasePass_2004;
378    float PrePadding_TranslucentBasePass_2008;
379    float PrePadding_TranslucentBasePass_2012;
380    float PrePadding_TranslucentBasePass_2016;
381    float PrePadding_TranslucentBasePass_2020;
382    float PrePadding_TranslucentBasePass_2024;
383    float PrePadding_TranslucentBasePass_2028;
384    float PrePadding_TranslucentBasePass_2032;
385    float PrePadding_TranslucentBasePass_2036;
386    float PrePadding_TranslucentBasePass_2040;
387    float PrePadding_TranslucentBasePass_2044;
388    float PrePadding_TranslucentBasePass_2048;
389    float PrePadding_TranslucentBasePass_2052;
390    float PrePadding_TranslucentBasePass_2056;
391    float PrePadding_TranslucentBasePass_2060;
392    float PrePadding_TranslucentBasePass_2064;
393    float PrePadding_TranslucentBasePass_2068;
394    float PrePadding_TranslucentBasePass_2072;
395    float PrePadding_TranslucentBasePass_2076;
396    float PrePadding_TranslucentBasePass_2080;
397    float PrePadding_TranslucentBasePass_2084;
398    float PrePadding_TranslucentBasePass_2088;
399    float PrePadding_TranslucentBasePass_2092;
400    float PrePadding_TranslucentBasePass_2096;
401    float PrePadding_TranslucentBasePass_2100;
402    float PrePadding_TranslucentBasePass_2104;
403    float PrePadding_TranslucentBasePass_2108;
404    float PrePadding_TranslucentBasePass_2112;
405    float PrePadding_TranslucentBasePass_2116;
406    float PrePadding_TranslucentBasePass_2120;
407    float PrePadding_TranslucentBasePass_2124;
408    float PrePadding_TranslucentBasePass_2128;
409    float PrePadding_TranslucentBasePass_2132;
410    float PrePadding_TranslucentBasePass_2136;
411    float PrePadding_TranslucentBasePass_2140;
412    float4 TranslucentBasePass_HZBUvFactorAndInvFactor;
413    float4 TranslucentBasePass_PrevScreenPositionScaleBias;
414    float TranslucentBasePass_PrevSceneColorPreExposureInv;
415};
416
417struct type_Material
418{
419    float4 Material_VectorExpressions[2];
420    float4 Material_ScalarExpressions[1];
421};
422
423constant float _108 = {};
424
425struct main0_out
426{
427    float4 out_var_SV_Target0 [[color(0)]];
428    uint gl_SampleMask [[sample_mask]];
429};
430
431struct main0_in
432{
433    float4 in_var_TEXCOORD10_centroid [[user(locn0)]];
434    float4 in_var_TEXCOORD11_centroid [[user(locn1)]];
435    uint in_var_PRIMITIVE_ID [[user(locn2)]];
436    float4 in_var_TEXCOORD7 [[user(locn3)]];
437};
438
439fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], const device type_StructuredBuffer_v4float& View_PrimitiveSceneData [[buffer(1)]], constant type_TranslucentBasePass& TranslucentBasePass [[buffer(2)]], constant type_Material& Material [[buffer(3)]], texture3d<float> TranslucentBasePass_Shared_Fog_IntegratedLightScattering [[texture(0)]], sampler View_SharedBilinearClampedSampler [[sampler(0)]], float4 gl_FragCoord [[position]], uint gl_SampleMaskIn [[sample_mask]])
440{
441    main0_out out = {};
442    float4 _137 = View.View_SVPositionToTranslatedWorld * float4(gl_FragCoord.xyz, 1.0);
443    float3 _142 = (_137.xyz / float3(_137.w)) - float3(View.View_PreViewTranslation);
444    bool _165 = TranslucentBasePass.TranslucentBasePass_Shared_Fog_ApplyVolumetricFog > 0.0;
445    float4 _215;
446    if (_165)
447    {
448        float4 _172 = View.View_WorldToClip * float4(_142, 1.0);
449        float _173 = _172.w;
450        float4 _202;
451        if (_165)
452        {
453            _202 = TranslucentBasePass_Shared_Fog_IntegratedLightScattering.sample(View_SharedBilinearClampedSampler, float3(((_172.xy / float2(_173)).xy * float2(0.5, -0.5)) + float2(0.5), (log2((_173 * View.View_VolumetricFogGridZParams[0]) + View.View_VolumetricFogGridZParams[1]) * View.View_VolumetricFogGridZParams[2]) * View.View_VolumetricFogInvGridSize[2]), level(0.0));
454        }
455        else
456        {
457            _202 = float4(0.0, 0.0, 0.0, 1.0);
458        }
459        _215 = float4(_202.xyz + (in.in_var_TEXCOORD7.xyz * float3(_202.w)), _202.w * in.in_var_TEXCOORD7.w);
460    }
461    else
462    {
463        _215 = in.in_var_TEXCOORD7;
464    }
465    float3 _216 = fast::max(Material.Material_VectorExpressions[1].xyz * float3(((1.0 + dot(float3(-1.0, -1.5, 3.0) / float3(sqrt(12.25)), normalize(float3x3(in.in_var_TEXCOORD10_centroid.xyz, cross(in.in_var_TEXCOORD11_centroid.xyz, in.in_var_TEXCOORD10_centroid.xyz) * float3(in.in_var_TEXCOORD11_centroid.w), in.in_var_TEXCOORD11_centroid.xyz) * normalize((float3(0.0, 0.0, 1.0) * float3(View.View_NormalOverrideParameter.w)) + View.View_NormalOverrideParameter.xyz)))) * 0.5) + 0.20000000298023223876953125), float3(0.0));
466    float3 _246;
467    if (View.View_OutOfBoundsMask > 0.0)
468    {
469        uint _222 = in.in_var_PRIMITIVE_ID * 26u;
470        float3 _245;
471        if (any(abs(_142 - View_PrimitiveSceneData._m0[_222 + 5u].xyz) > (View_PrimitiveSceneData._m0[_222 + 19u].xyz + float3(1.0))))
472        {
473            _245 = mix(float3(1.0, 1.0, 0.0), float3(0.0, 1.0, 1.0), float3(float3(fract(dot(_142, float3(0.57700002193450927734375)) * 0.00200000009499490261077880859375)) > float3(0.5)));
474        }
475        else
476        {
477            _245 = _216;
478        }
479        _246 = _245;
480    }
481    else
482    {
483        _246 = _216;
484    }
485    float4 _256 = float4((_246 * float3(_215.w)) + _215.xyz, _108);
486    _256.w = 1.0;
487    float4 _268;
488    uint _269;
489    if (View.View_NumSceneColorMSAASamples > 1)
490    {
491        _268 = _256 * float4(float(View.View_NumSceneColorMSAASamples) * 0.25);
492        _269 = gl_SampleMaskIn & 15u;
493    }
494    else
495    {
496        _268 = _256;
497        _269 = gl_SampleMaskIn;
498    }
499    out.out_var_SV_Target0 = _268;
500    out.gl_SampleMask = _269;
501    return out;
502}
503
504