| 1 |
#pragma clang diagnostic ignored "-Wmissing-prototypes" |
| 2 |
#pragma clang diagnostic ignored "-Wmissing-braces" |
| 3 |
|
| 4 |
#include <metal_stdlib> |
| 5 |
#include <simd/simd.h> |
| 6 |
|
| 7 |
using namespace metal; |
| 8 |
|
| 9 |
template<typename T, size_t Num> |
| 10 |
struct spvUnsafeArray |
| 11 |
{ |
| 12 |
T elements[Num ? Num : 1]; |
| 13 |
|
| 14 |
thread T& operator [] (size_t pos) thread |
| 15 |
{ |
| 16 |
return elements[pos]; |
| 17 |
} |
| 18 |
constexpr const thread T& operator [] (size_t pos) const thread |
| 19 |
{ |
| 20 |
return elements[pos]; |
| 21 |
} |
| 22 |
|
| 23 |
device T& operator [] (size_t pos) device |
| 24 |
{ |
| 25 |
return elements[pos]; |
| 26 |
} |
| 27 |
constexpr const device T& operator [] (size_t pos) const device |
| 28 |
{ |
| 29 |
return elements[pos]; |
| 30 |
} |
| 31 |
|
| 32 |
constexpr const constant T& operator [] (size_t pos) const constant |
| 33 |
{ |
| 34 |
return elements[pos]; |
| 35 |
} |
| 36 |
|
| 37 |
threadgroup T& operator [] (size_t pos) threadgroup |
| 38 |
{ |
| 39 |
return elements[pos]; |
| 40 |
} |
| 41 |
constexpr const threadgroup T& operator [] (size_t pos) const threadgroup |
| 42 |
{ |
| 43 |
return elements[pos]; |
| 44 |
} |
| 45 |
}; |
| 46 |
|
| 47 |
struct type_View |
| 48 |
{ |
| 49 |
float4x4 View_TranslatedWorldToClip; |
| 50 |
float4x4 View_WorldToClip; |
| 51 |
float4x4 View_ClipToWorld; |
| 52 |
float4x4 View_TranslatedWorldToView; |
| 53 |
float4x4 View_ViewToTranslatedWorld; |
| 54 |
float4x4 View_TranslatedWorldToCameraView; |
| 55 |
float4x4 View_CameraViewToTranslatedWorld; |
| 56 |
float4x4 View_ViewToClip; |
| 57 |
float4x4 View_ViewToClipNoAA; |
| 58 |
float4x4 View_ClipToView; |
| 59 |
float4x4 View_ClipToTranslatedWorld; |
| 60 |
float4x4 View_SVPositionToTranslatedWorld; |
| 61 |
float4x4 View_ScreenToWorld; |
| 62 |
float4x4 View_ScreenToTranslatedWorld; |
| 63 |
packed_float3 View_ViewForward; |
| 64 |
float PrePadding_View_908; |
| 65 |
packed_float3 View_ViewUp; |
| 66 |
float PrePadding_View_924; |
| 67 |
packed_float3 View_ViewRight; |
| 68 |
float PrePadding_View_940; |
| 69 |
packed_float3 View_HMDViewNoRollUp; |
| 70 |
float PrePadding_View_956; |
| 71 |
packed_float3 View_HMDViewNoRollRight; |
| 72 |
float PrePadding_View_972; |
| 73 |
float4 View_InvDeviceZToWorldZTransform; |
| 74 |
float4 View_ScreenPositionScaleBias; |
| 75 |
packed_float3 View_WorldCameraOrigin; |
| 76 |
float PrePadding_View_1020; |
| 77 |
packed_float3 View_TranslatedWorldCameraOrigin; |
| 78 |
float PrePadding_View_1036; |
| 79 |
packed_float3 View_WorldViewOrigin; |
| 80 |
float PrePadding_View_1052; |
| 81 |
packed_float3 View_PreViewTranslation; |
| 82 |
float PrePadding_View_1068; |
| 83 |
float4x4 View_PrevProjection; |
| 84 |
float4x4 View_PrevViewProj; |
| 85 |
float4x4 View_PrevViewRotationProj; |
| 86 |
float4x4 View_PrevViewToClip; |
| 87 |
float4x4 View_PrevClipToView; |
| 88 |
float4x4 View_PrevTranslatedWorldToClip; |
| 89 |
float4x4 View_PrevTranslatedWorldToView; |
| 90 |
float4x4 View_PrevViewToTranslatedWorld; |
| 91 |
float4x4 View_PrevTranslatedWorldToCameraView; |
| 92 |
float4x4 View_PrevCameraViewToTranslatedWorld; |
| 93 |
packed_float3 View_PrevWorldCameraOrigin; |
| 94 |
float PrePadding_View_1724; |
| 95 |
packed_float3 View_PrevWorldViewOrigin; |
| 96 |
float PrePadding_View_1740; |
| 97 |
packed_float3 View_PrevPreViewTranslation; |
| 98 |
float PrePadding_View_1756; |
| 99 |
float4x4 View_PrevInvViewProj; |
| 100 |
float4x4 View_PrevScreenToTranslatedWorld; |
| 101 |
float4x4 View_ClipToPrevClip; |
| 102 |
float4 View_TemporalAAJitter; |
| 103 |
float4 View_GlobalClippingPlane; |
| 104 |
float2 View_FieldOfViewWideAngles; |
| 105 |
float2 View_PrevFieldOfViewWideAngles; |
| 106 |
float4 View_ViewRectMin; |
| 107 |
float4 View_ViewSizeAndInvSize; |
| 108 |
float4 View_BufferSizeAndInvSize; |
| 109 |
float4 View_BufferBilinearUVMinMax; |
| 110 |
int View_NumSceneColorMSAASamples; |
| 111 |
float View_PreExposure; |
| 112 |
float View_OneOverPreExposure; |
| 113 |
float PrePadding_View_2076; |
| 114 |
float4 View_DiffuseOverrideParameter; |
| 115 |
float4 View_SpecularOverrideParameter; |
| 116 |
float4 View_NormalOverrideParameter; |
| 117 |
float2 View_RoughnessOverrideParameter; |
| 118 |
float View_PrevFrameGameTime; |
| 119 |
float View_PrevFrameRealTime; |
| 120 |
float View_OutOfBoundsMask; |
| 121 |
float PrePadding_View_2148; |
| 122 |
float PrePadding_View_2152; |
| 123 |
float PrePadding_View_2156; |
| 124 |
packed_float3 View_WorldCameraMovementSinceLastFrame; |
| 125 |
float View_CullingSign; |
| 126 |
float View_NearPlane; |
| 127 |
float View_AdaptiveTessellationFactor; |
| 128 |
float View_GameTime; |
| 129 |
float View_RealTime; |
| 130 |
float View_DeltaTime; |
| 131 |
float View_MaterialTextureMipBias; |
| 132 |
float View_MaterialTextureDerivativeMultiply; |
| 133 |
uint View_Random; |
| 134 |
uint View_FrameNumber; |
| 135 |
uint View_StateFrameIndexMod8; |
| 136 |
uint View_StateFrameIndex; |
| 137 |
float View_CameraCut; |
| 138 |
float View_UnlitViewmodeMask; |
| 139 |
float PrePadding_View_2228; |
| 140 |
float PrePadding_View_2232; |
| 141 |
float PrePadding_View_2236; |
| 142 |
float4 View_DirectionalLightColor; |
| 143 |
packed_float3 View_DirectionalLightDirection; |
| 144 |
float PrePadding_View_2268; |
| 145 |
float4 View_TranslucencyLightingVolumeMin[2]; |
| 146 |
float4 View_TranslucencyLightingVolumeInvSize[2]; |
| 147 |
float4 View_TemporalAAParams; |
| 148 |
float4 View_CircleDOFParams; |
| 149 |
float View_DepthOfFieldSensorWidth; |
| 150 |
float View_DepthOfFieldFocalDistance; |
| 151 |
float View_DepthOfFieldScale; |
| 152 |
float View_DepthOfFieldFocalLength; |
| 153 |
float View_DepthOfFieldFocalRegion; |
| 154 |
float View_DepthOfFieldNearTransitionRegion; |
| 155 |
float View_DepthOfFieldFarTransitionRegion; |
| 156 |
float View_MotionBlurNormalizedToPixel; |
| 157 |
float View_bSubsurfacePostprocessEnabled; |
| 158 |
float View_GeneralPurposeTweak; |
| 159 |
float View_DemosaicVposOffset; |
| 160 |
float PrePadding_View_2412; |
| 161 |
packed_float3 View_IndirectLightingColorScale; |
| 162 |
float View_HDR32bppEncodingMode; |
| 163 |
packed_float3 View_AtmosphericFogSunDirection; |
| 164 |
float View_AtmosphericFogSunPower; |
| 165 |
float View_AtmosphericFogPower; |
| 166 |
float View_AtmosphericFogDensityScale; |
| 167 |
float View_AtmosphericFogDensityOffset; |
| 168 |
float View_AtmosphericFogGroundOffset; |
| 169 |
float View_AtmosphericFogDistanceScale; |
| 170 |
float View_AtmosphericFogAltitudeScale; |
| 171 |
float View_AtmosphericFogHeightScaleRayleigh; |
| 172 |
float View_AtmosphericFogStartDistance; |
| 173 |
float View_AtmosphericFogDistanceOffset; |
| 174 |
float View_AtmosphericFogSunDiscScale; |
| 175 |
float View_AtmosphericFogSunDiscHalfApexAngleRadian; |
| 176 |
float PrePadding_View_2492; |
| 177 |
float4 View_AtmosphericFogSunDiscLuminance; |
| 178 |
uint View_AtmosphericFogRenderMask; |
| 179 |
uint View_AtmosphericFogInscatterAltitudeSampleNum; |
| 180 |
uint PrePadding_View_2520; |
| 181 |
uint PrePadding_View_2524; |
| 182 |
float4 View_AtmosphericFogSunColor; |
| 183 |
packed_float3 View_NormalCurvatureToRoughnessScaleBias; |
| 184 |
float View_RenderingReflectionCaptureMask; |
| 185 |
float4 View_AmbientCubemapTint; |
| 186 |
float View_AmbientCubemapIntensity; |
| 187 |
float View_SkyLightParameters; |
| 188 |
float PrePadding_View_2584; |
| 189 |
float PrePadding_View_2588; |
| 190 |
float4 View_SkyLightColor; |
| 191 |
float4 View_SkyIrradianceEnvironmentMap[7]; |
| 192 |
float View_MobilePreviewMode; |
| 193 |
float View_HMDEyePaddingOffset; |
| 194 |
float View_ReflectionCubemapMaxMip; |
| 195 |
float View_ShowDecalsMask; |
| 196 |
uint View_DistanceFieldAOSpecularOcclusionMode; |
| 197 |
float View_IndirectCapsuleSelfShadowingIntensity; |
| 198 |
float PrePadding_View_2744; |
| 199 |
float PrePadding_View_2748; |
| 200 |
packed_float3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight; |
| 201 |
int View_StereoPassIndex; |
| 202 |
float4 View_GlobalVolumeCenterAndExtent[4]; |
| 203 |
float4 View_GlobalVolumeWorldToUVAddAndMul[4]; |
| 204 |
float View_GlobalVolumeDimension; |
| 205 |
float View_GlobalVolumeTexelSize; |
| 206 |
float View_MaxGlobalDistance; |
| 207 |
float PrePadding_View_2908; |
| 208 |
int2 View_CursorPosition; |
| 209 |
float View_bCheckerboardSubsurfaceProfileRendering; |
| 210 |
float PrePadding_View_2924; |
| 211 |
packed_float3 View_VolumetricFogInvGridSize; |
| 212 |
float PrePadding_View_2940; |
| 213 |
packed_float3 View_VolumetricFogGridZParams; |
| 214 |
float PrePadding_View_2956; |
| 215 |
float2 View_VolumetricFogSVPosToVolumeUV; |
| 216 |
float View_VolumetricFogMaxDistance; |
| 217 |
float PrePadding_View_2972; |
| 218 |
packed_float3 View_VolumetricLightmapWorldToUVScale; |
| 219 |
float PrePadding_View_2988; |
| 220 |
packed_float3 View_VolumetricLightmapWorldToUVAdd; |
| 221 |
float PrePadding_View_3004; |
| 222 |
packed_float3 View_VolumetricLightmapIndirectionTextureSize; |
| 223 |
float View_VolumetricLightmapBrickSize; |
| 224 |
packed_float3 View_VolumetricLightmapBrickTexelSize; |
| 225 |
float View_StereoIPD; |
| 226 |
float View_IndirectLightingCacheShowFlag; |
| 227 |
float View_EyeToPixelSpreadAngle; |
| 228 |
}; |
| 229 |
|
| 230 |
struct type_ShadowDepthPass |
| 231 |
{ |
| 232 |
float PrePadding_ShadowDepthPass_LPV_0; |
| 233 |
float PrePadding_ShadowDepthPass_LPV_4; |
| 234 |
float PrePadding_ShadowDepthPass_LPV_8; |
| 235 |
float PrePadding_ShadowDepthPass_LPV_12; |
| 236 |
float PrePadding_ShadowDepthPass_LPV_16; |
| 237 |
float PrePadding_ShadowDepthPass_LPV_20; |
| 238 |
float PrePadding_ShadowDepthPass_LPV_24; |
| 239 |
float PrePadding_ShadowDepthPass_LPV_28; |
| 240 |
float PrePadding_ShadowDepthPass_LPV_32; |
| 241 |
float PrePadding_ShadowDepthPass_LPV_36; |
| 242 |
float PrePadding_ShadowDepthPass_LPV_40; |
| 243 |
float PrePadding_ShadowDepthPass_LPV_44; |
| 244 |
float PrePadding_ShadowDepthPass_LPV_48; |
| 245 |
float PrePadding_ShadowDepthPass_LPV_52; |
| 246 |
float PrePadding_ShadowDepthPass_LPV_56; |
| 247 |
float PrePadding_ShadowDepthPass_LPV_60; |
| 248 |
float PrePadding_ShadowDepthPass_LPV_64; |
| 249 |
float PrePadding_ShadowDepthPass_LPV_68; |
| 250 |
float PrePadding_ShadowDepthPass_LPV_72; |
| 251 |
float PrePadding_ShadowDepthPass_LPV_76; |
| 252 |
float PrePadding_ShadowDepthPass_LPV_80; |
| 253 |
float PrePadding_ShadowDepthPass_LPV_84; |
| 254 |
float PrePadding_ShadowDepthPass_LPV_88; |
| 255 |
float PrePadding_ShadowDepthPass_LPV_92; |
| 256 |
float PrePadding_ShadowDepthPass_LPV_96; |
| 257 |
float PrePadding_ShadowDepthPass_LPV_100; |
| 258 |
float PrePadding_ShadowDepthPass_LPV_104; |
| 259 |
float PrePadding_ShadowDepthPass_LPV_108; |
| 260 |
float PrePadding_ShadowDepthPass_LPV_112; |
| 261 |
float PrePadding_ShadowDepthPass_LPV_116; |
| 262 |
float PrePadding_ShadowDepthPass_LPV_120; |
| 263 |
float PrePadding_ShadowDepthPass_LPV_124; |
| 264 |
float PrePadding_ShadowDepthPass_LPV_128; |
| 265 |
float PrePadding_ShadowDepthPass_LPV_132; |
| 266 |
float PrePadding_ShadowDepthPass_LPV_136; |
| 267 |
float PrePadding_ShadowDepthPass_LPV_140; |
| 268 |
float PrePadding_ShadowDepthPass_LPV_144; |
| 269 |
float PrePadding_ShadowDepthPass_LPV_148; |
| 270 |
float PrePadding_ShadowDepthPass_LPV_152; |
| 271 |
float PrePadding_ShadowDepthPass_LPV_156; |
| 272 |
float PrePadding_ShadowDepthPass_LPV_160; |
| 273 |
float PrePadding_ShadowDepthPass_LPV_164; |
| 274 |
float PrePadding_ShadowDepthPass_LPV_168; |
| 275 |
float PrePadding_ShadowDepthPass_LPV_172; |
| 276 |
float PrePadding_ShadowDepthPass_LPV_176; |
| 277 |
float PrePadding_ShadowDepthPass_LPV_180; |
| 278 |
float PrePadding_ShadowDepthPass_LPV_184; |
| 279 |
float PrePadding_ShadowDepthPass_LPV_188; |
| 280 |
float PrePadding_ShadowDepthPass_LPV_192; |
| 281 |
float PrePadding_ShadowDepthPass_LPV_196; |
| 282 |
float PrePadding_ShadowDepthPass_LPV_200; |
| 283 |
float PrePadding_ShadowDepthPass_LPV_204; |
| 284 |
float PrePadding_ShadowDepthPass_LPV_208; |
| 285 |
float PrePadding_ShadowDepthPass_LPV_212; |
| 286 |
float PrePadding_ShadowDepthPass_LPV_216; |
| 287 |
float PrePadding_ShadowDepthPass_LPV_220; |
| 288 |
float PrePadding_ShadowDepthPass_LPV_224; |
| 289 |
float PrePadding_ShadowDepthPass_LPV_228; |
| 290 |
float PrePadding_ShadowDepthPass_LPV_232; |
| 291 |
float PrePadding_ShadowDepthPass_LPV_236; |
| 292 |
float PrePadding_ShadowDepthPass_LPV_240; |
| 293 |
float PrePadding_ShadowDepthPass_LPV_244; |
| 294 |
float PrePadding_ShadowDepthPass_LPV_248; |
| 295 |
float PrePadding_ShadowDepthPass_LPV_252; |
| 296 |
float PrePadding_ShadowDepthPass_LPV_256; |
| 297 |
float PrePadding_ShadowDepthPass_LPV_260; |
| 298 |
float PrePadding_ShadowDepthPass_LPV_264; |
| 299 |
float PrePadding_ShadowDepthPass_LPV_268; |
| 300 |
float4x4 ShadowDepthPass_LPV_mRsmToWorld; |
| 301 |
float4 ShadowDepthPass_LPV_mLightColour; |
| 302 |
float4 ShadowDepthPass_LPV_GeometryVolumeCaptureLightDirection; |
| 303 |
float4 ShadowDepthPass_LPV_mEyePos; |
| 304 |
packed_int3 ShadowDepthPass_LPV_mOldGridOffset; |
| 305 |
int PrePadding_ShadowDepthPass_LPV_396; |
| 306 |
packed_int3 ShadowDepthPass_LPV_mLpvGridOffset; |
| 307 |
float ShadowDepthPass_LPV_ClearMultiplier; |
| 308 |
float ShadowDepthPass_LPV_LpvScale; |
| 309 |
float ShadowDepthPass_LPV_OneOverLpvScale; |
| 310 |
float ShadowDepthPass_LPV_DirectionalOcclusionIntensity; |
| 311 |
float ShadowDepthPass_LPV_DirectionalOcclusionRadius; |
| 312 |
float ShadowDepthPass_LPV_RsmAreaIntensityMultiplier; |
| 313 |
float ShadowDepthPass_LPV_RsmPixelToTexcoordMultiplier; |
| 314 |
float ShadowDepthPass_LPV_SecondaryOcclusionStrength; |
| 315 |
float ShadowDepthPass_LPV_SecondaryBounceStrength; |
| 316 |
float ShadowDepthPass_LPV_VplInjectionBias; |
| 317 |
float ShadowDepthPass_LPV_GeometryVolumeInjectionBias; |
| 318 |
float ShadowDepthPass_LPV_EmissiveInjectionMultiplier; |
| 319 |
int ShadowDepthPass_LPV_PropagationIndex; |
| 320 |
float4x4 ShadowDepthPass_ProjectionMatrix; |
| 321 |
float4x4 ShadowDepthPass_ViewMatrix; |
| 322 |
float4 ShadowDepthPass_ShadowParams; |
| 323 |
float ShadowDepthPass_bClampToNearPlane; |
| 324 |
float PrePadding_ShadowDepthPass_612; |
| 325 |
float PrePadding_ShadowDepthPass_616; |
| 326 |
float PrePadding_ShadowDepthPass_620; |
| 327 |
float4x4 ShadowDepthPass_ShadowViewProjectionMatrices[6]; |
| 328 |
float4x4 ShadowDepthPass_ShadowViewMatrices[6]; |
| 329 |
}; |
| 330 |
|
| 331 |
constant float4 _113 = {}; |
| 332 |
|
| 333 |
struct main0_out |
| 334 |
{ |
| 335 |
float4 out_var_TEXCOORD10_centroid [[user(locn0)]]; |
| 336 |
float4 out_var_TEXCOORD11_centroid [[user(locn1)]]; |
| 337 |
float4 out_var_COLOR0 [[user(locn2)]]; |
| 338 |
float4 out_var_TEXCOORD0_0 [[user(locn3)]]; |
| 339 |
uint out_var_PRIMITIVE_ID [[user(locn4)]]; |
| 340 |
float out_var_TEXCOORD6 [[user(locn5)]]; |
| 341 |
float out_var_TEXCOORD8 [[user(locn6)]]; |
| 342 |
float3 out_var_TEXCOORD7 [[user(locn7)]]; |
| 343 |
float4 gl_Position [[position]]; |
| 344 |
}; |
| 345 |
|
| 346 |
struct main0_in |
| 347 |
{ |
| 348 |
float4 in_var_COLOR0 [[attribute(0)]]; |
| 349 |
float4 in_var_PN_POSITION_0 [[attribute(2)]]; |
| 350 |
float4 in_var_PN_POSITION_1 [[attribute(3)]]; |
| 351 |
float4 in_var_PN_POSITION_2 [[attribute(4)]]; |
| 352 |
float in_var_PN_WorldDisplacementMultiplier [[attribute(7)]]; |
| 353 |
uint in_var_PRIMITIVE_ID [[attribute(8)]]; |
| 354 |
float4 in_var_TEXCOORD0_0 [[attribute(9)]]; |
| 355 |
float4 in_var_TEXCOORD10_centroid [[attribute(10)]]; |
| 356 |
float4 in_var_TEXCOORD11_centroid [[attribute(11)]]; |
| 357 |
}; |
| 358 |
|
| 359 |
struct main0_patchIn |
| 360 |
{ |
| 361 |
float4 in_var_PN_POSITION9 [[attribute(5)]]; |
| 362 |
patch_control_point<main0_in> gl_in; |
| 363 |
}; |
| 364 |
|
| 365 |
[[ patch(triangle, 0) ]] vertex main0_out main0(main0_patchIn patchIn [[stage_in]], constant type_View& View [[buffer(0)]], constant type_ShadowDepthPass& ShadowDepthPass [[buffer(1)]], texture2d<float> Material_Texture2D_3 [[texture(0)]], sampler Material_Texture2D_3Sampler [[sampler(0)]], float3 gl_TessCoord [[position_in_patch]]) |
| 366 |
{ |
| 367 |
main0_out out = {}; |
| 368 |
spvUnsafeArray<float4, 1> out_var_TEXCOORD0 = {}; |
| 369 |
spvUnsafeArray<float4, 3> _117 = spvUnsafeArray<float4, 3>({ patchIn.gl_in[0].in_var_TEXCOORD10_centroid, patchIn.gl_in[1].in_var_TEXCOORD10_centroid, patchIn.gl_in[2].in_var_TEXCOORD10_centroid }); |
| 370 |
spvUnsafeArray<float4, 3> _118 = spvUnsafeArray<float4, 3>({ patchIn.gl_in[0].in_var_TEXCOORD11_centroid, patchIn.gl_in[1].in_var_TEXCOORD11_centroid, patchIn.gl_in[2].in_var_TEXCOORD11_centroid }); |
| 371 |
spvUnsafeArray<float4, 3> _119 = spvUnsafeArray<float4, 3>({ patchIn.gl_in[0].in_var_COLOR0, patchIn.gl_in[1].in_var_COLOR0, patchIn.gl_in[2].in_var_COLOR0 }); |
| 372 |
spvUnsafeArray<spvUnsafeArray<float4, 1>, 3> _120 = spvUnsafeArray<spvUnsafeArray<float4, 1>, 3>({ spvUnsafeArray<float4, 1>({ patchIn.gl_in[0].in_var_TEXCOORD0_0 }), spvUnsafeArray<float4, 1>({ patchIn.gl_in[1].in_var_TEXCOORD0_0 }), spvUnsafeArray<float4, 1>({ patchIn.gl_in[2].in_var_TEXCOORD0_0 }) }); |
| 373 |
spvUnsafeArray<spvUnsafeArray<float4, 3>, 3> _135 = spvUnsafeArray<spvUnsafeArray<float4, 3>, 3>({ spvUnsafeArray<float4, 3>({ patchIn.gl_in[0].in_var_PN_POSITION_0, patchIn.gl_in[0].in_var_PN_POSITION_1, patchIn.gl_in[0].in_var_PN_POSITION_2 }), spvUnsafeArray<float4, 3>({ patchIn.gl_in[1].in_var_PN_POSITION_0, patchIn.gl_in[1].in_var_PN_POSITION_1, patchIn.gl_in[1].in_var_PN_POSITION_2 }), spvUnsafeArray<float4, 3>({ patchIn.gl_in[2].in_var_PN_POSITION_0, patchIn.gl_in[2].in_var_PN_POSITION_1, patchIn.gl_in[2].in_var_PN_POSITION_2 }) }); |
| 374 |
spvUnsafeArray<float, 3> _136 = spvUnsafeArray<float, 3>({ patchIn.gl_in[0].in_var_PN_WorldDisplacementMultiplier, patchIn.gl_in[1].in_var_PN_WorldDisplacementMultiplier, patchIn.gl_in[2].in_var_PN_WorldDisplacementMultiplier }); |
| 375 |
float _157 = gl_TessCoord.x * gl_TessCoord.x; |
| 376 |
float _158 = gl_TessCoord.y * gl_TessCoord.y; |
| 377 |
float _159 = gl_TessCoord.z * gl_TessCoord.z; |
| 378 |
float4 _165 = float4(gl_TessCoord.x); |
| 379 |
float4 _169 = float4(gl_TessCoord.y); |
| 380 |
float4 _174 = float4(gl_TessCoord.z); |
| 381 |
float4 _177 = float4(_157 * 3.0); |
| 382 |
float4 _181 = float4(_158 * 3.0); |
| 383 |
float4 _188 = float4(_159 * 3.0); |
| 384 |
float4 _202 = ((((((((((_135[0][0] * float4(_157)) * _165) + ((_135[1][0] * float4(_158)) * _169)) + ((_135[2][0] * float4(_159)) * _174)) + ((_135[0][1] * _177) * _169)) + ((_135[0][2] * _181) * _165)) + ((_135[1][1] * _181) * _174)) + ((_135[1][2] * _188) * _169)) + ((_135[2][1] * _188) * _165)) + ((_135[2][2] * _177) * _174)) + ((((patchIn.in_var_PN_POSITION9 * float4(6.0)) * _174) * _165) * _169); |
| 385 |
float3 _226 = ((_117[0].xyz * float3(gl_TessCoord.x)) + (_117[1].xyz * float3(gl_TessCoord.y))).xyz + (_117[2].xyz * float3(gl_TessCoord.z)); |
| 386 |
float4 _229 = ((_118[0] * _165) + (_118[1] * _169)) + (_118[2] * _174); |
| 387 |
float4 _231 = ((_119[0] * _165) + (_119[1] * _169)) + (_119[2] * _174); |
| 388 |
float4 _233 = ((_120[0][0] * _165) + (_120[1][0] * _169)) + (_120[2][0] * _174); |
| 389 |
spvUnsafeArray<float4, 1> _234 = spvUnsafeArray<float4, 1>({ _233 }); |
| 390 |
float3 _236 = _229.xyz; |
| 391 |
float3 _264 = _202.xyz + (((float3((Material_Texture2D_3.sample(Material_Texture2D_3Sampler, (float2(View.View_GameTime * 0.20000000298023223876953125, View.View_GameTime * (-0.699999988079071044921875)) + (_233.zw * float2(1.0, 2.0))), level(-1.0)).x * 10.0) * (1.0 - _231.x)) * _236) * float3(0.5)) * float3(((_136[0] * gl_TessCoord.x) + (_136[1] * gl_TessCoord.y)) + (_136[2] * gl_TessCoord.z))); |
| 392 |
float4x4 _116 = ShadowDepthPass.ShadowDepthPass_ViewMatrix; |
| 393 |
float4 _270 = ShadowDepthPass.ShadowDepthPass_ProjectionMatrix * float4(_264.x, _264.y, _264.z, _202.w); |
| 394 |
float4 _281; |
| 395 |
if ((ShadowDepthPass.ShadowDepthPass_bClampToNearPlane > 0.0) && (_270.z < 0.0)) |
| 396 |
{ |
| 397 |
float4 _279 = _270; |
| 398 |
_279.z = 9.9999999747524270787835121154785e-07; |
| 399 |
float4 _280 = _279; |
| 400 |
_280.w = 1.0; |
| 401 |
_281 = _280; |
| 402 |
} |
| 403 |
else |
| 404 |
{ |
| 405 |
_281 = _270; |
| 406 |
} |
| 407 |
float _290 = abs(dot(float3(_116[0u].z, _116[1u].z, _116[2u].z), _236)); |
| 408 |
out.out_var_TEXCOORD10_centroid = float4(_226.x, _226.y, _226.z, _113.w); |
| 409 |
out.out_var_TEXCOORD11_centroid = _229; |
| 410 |
out.out_var_COLOR0 = _231; |
| 411 |
out_var_TEXCOORD0 = _234; |
| 412 |
out.out_var_PRIMITIVE_ID = patchIn.gl_in[0u].in_var_PRIMITIVE_ID; |
| 413 |
out.out_var_TEXCOORD6 = _281.z; |
| 414 |
out.out_var_TEXCOORD8 = (ShadowDepthPass.ShadowDepthPass_ShadowParams.y * fast::clamp((abs(_290) > 0.0) ? (sqrt(fast::clamp(1.0 - (_290 * _290), 0.0, 1.0)) / _290) : ShadowDepthPass.ShadowDepthPass_ShadowParams.z, 0.0, ShadowDepthPass.ShadowDepthPass_ShadowParams.z)) + ShadowDepthPass.ShadowDepthPass_ShadowParams.x; |
| 415 |
out.out_var_TEXCOORD7 = _264.xyz; |
| 416 |
out.gl_Position = _281; |
| 417 |
out.out_var_TEXCOORD0_0 = out_var_TEXCOORD0[0]; |
| 418 |
return out; |
| 419 |
} |
| 420 |
|