Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 310 es
- precision mediump float;
- precision highp int;
- layout(set = 3, binding = 0, std140) uniform HLSLCC_CBh
- {
- highp vec4 pu_h[2];
- } _16;
- layout(set = 3, binding = 5, std140) uniform Material
- {
- highp vec4 Material_VectorExpressions[5];
- } _154;
- layout(set = 3, binding = 3, std140) uniform PrecomputedLightingBuffer
- {
- highp vec3 PrecomputedLightingBuffer_IndirectLightingCachePrimitiveAdd;
- highp float PrePadding_PrecomputedLightingBuffer_12;
- highp vec3 PrecomputedLightingBuffer_IndirectLightingCachePrimitiveScale;
- highp float PrePadding_PrecomputedLightingBuffer_28;
- highp vec3 PrecomputedLightingBuffer_IndirectLightingCacheMinUV;
- highp float PrePadding_PrecomputedLightingBuffer_44;
- highp vec3 PrecomputedLightingBuffer_IndirectLightingCacheMaxUV;
- highp float PrePadding_PrecomputedLightingBuffer_60;
- highp vec4 PrecomputedLightingBuffer_PointSkyBentNormal;
- highp float PrecomputedLightingBuffer_DirectionalLightShadowing;
- highp float PrePadding_PrecomputedLightingBuffer_84;
- highp float PrePadding_PrecomputedLightingBuffer_88;
- highp float PrePadding_PrecomputedLightingBuffer_92;
- highp vec4 PrecomputedLightingBuffer_StaticShadowMapMasks;
- highp vec4 PrecomputedLightingBuffer_InvUniformPenumbraSizes;
- highp vec4 PrecomputedLightingBuffer_IndirectLightingSHCoefficients0[3];
- highp vec4 PrecomputedLightingBuffer_IndirectLightingSHCoefficients1[3];
- highp vec4 PrecomputedLightingBuffer_IndirectLightingSHCoefficients2;
- highp vec4 PrecomputedLightingBuffer_IndirectLightingSHSingleCoefficient;
- highp vec4 PrecomputedLightingBuffer_LightMapCoordinateScaleBias;
- highp vec4 PrecomputedLightingBuffer_ShadowMapCoordinateScaleBias;
- highp vec4 PrecomputedLightingBuffer_LightMapScale[2];
- highp vec4 PrecomputedLightingBuffer_LightMapAdd[2];
- } _421;
- layout(set = 3, binding = 2, std140) uniform Primitive
- {
- highp mat4 Primitive_LocalToWorld;
- highp mat4 Primitive_WorldToLocal;
- highp vec4 Primitive_ObjectWorldPositionAndRadius;
- highp vec3 Primitive_ObjectBounds;
- highp float Primitive_LocalToWorldDeterminantSign;
- highp vec3 Primitive_ActorWorldPosition;
- highp float Primitive_DecalReceiverMask;
- highp float Primitive_PerObjectGBufferData;
- highp float Primitive_UseSingleSampleShadowFromStationaryLights;
- highp float Primitive_UseVolumetricLightmapShadowFromStationaryLights;
- highp float Primitive_UseEditorDepthTest;
- highp vec4 Primitive_ObjectOrientation;
- highp vec4 Primitive_NonUniformScale;
- highp vec4 Primitive_InvNonUniformScale;
- highp vec3 Primitive_LocalObjectBoundsMin;
- highp float PrePadding_Primitive_252;
- highp vec3 Primitive_LocalObjectBoundsMax;
- uint Primitive_LightingChannelMask;
- highp float Primitive_LpvBiasMultiplier;
- } _490;
- layout(set = 3, binding = 4, std140) uniform MobileDirectionalLight
- {
- highp vec4 MobileDirectionalLight_DirectionalLightColor;
- highp vec3 MobileDirectionalLight_DirectionalLightDirection;
- highp float MobileDirectionalLight_DirectionalLightShadowTransition;
- highp vec4 MobileDirectionalLight_DirectionalLightShadowSize;
- highp mat4 MobileDirectionalLight_DirectionalLightScreenToShadow[4];
- highp vec4 MobileDirectionalLight_DirectionalLightShadowDistances;
- highp vec2 MobileDirectionalLight_DirectionalLightDistanceFadeMAD;
- } _508;
- layout(set = 3, binding = 1, std140) uniform View
- {
- highp mat4 View_TranslatedWorldToClip;
- highp mat4 View_WorldToClip;
- highp mat4 View_TranslatedWorldToView;
- highp mat4 View_ViewToTranslatedWorld;
- highp mat4 View_TranslatedWorldToCameraView;
- highp mat4 View_CameraViewToTranslatedWorld;
- highp mat4 View_ViewToClip;
- highp mat4 View_ViewToClipNoAA;
- highp mat4 View_ClipToView;
- highp mat4 View_ClipToTranslatedWorld;
- highp mat4 View_SVPositionToTranslatedWorld;
- highp mat4 View_ScreenToWorld;
- highp mat4 View_ScreenToTranslatedWorld;
- highp vec3 View_ViewForward;
- highp float PrePadding_View_844;
- highp vec3 View_ViewUp;
- highp float PrePadding_View_860;
- highp vec3 View_ViewRight;
- highp float PrePadding_View_876;
- highp vec3 View_HMDViewNoRollUp;
- highp float PrePadding_View_892;
- highp vec3 View_HMDViewNoRollRight;
- highp float PrePadding_View_908;
- highp vec4 View_InvDeviceZToWorldZTransform;
- highp vec4 View_ScreenPositionScaleBias;
- highp vec3 View_WorldCameraOrigin;
- highp float PrePadding_View_956;
- highp vec3 View_TranslatedWorldCameraOrigin;
- highp float PrePadding_View_972;
- highp vec3 View_WorldViewOrigin;
- highp float PrePadding_View_988;
- highp vec3 View_PreViewTranslation;
- highp float PrePadding_View_1004;
- highp mat4 View_PrevProjection;
- highp mat4 View_PrevViewProj;
- highp mat4 View_PrevViewRotationProj;
- highp mat4 View_PrevViewToClip;
- highp mat4 View_PrevClipToView;
- highp mat4 View_PrevTranslatedWorldToClip;
- highp mat4 View_PrevTranslatedWorldToView;
- highp mat4 View_PrevViewToTranslatedWorld;
- highp mat4 View_PrevTranslatedWorldToCameraView;
- highp mat4 View_PrevCameraViewToTranslatedWorld;
- highp vec3 View_PrevWorldCameraOrigin;
- highp float PrePadding_View_1660;
- highp vec3 View_PrevWorldViewOrigin;
- highp float PrePadding_View_1676;
- highp vec3 View_PrevPreViewTranslation;
- highp float PrePadding_View_1692;
- highp mat4 View_PrevInvViewProj;
- highp mat4 View_PrevScreenToTranslatedWorld;
- highp mat4 View_ClipToPrevClip;
- highp vec4 View_TemporalAAJitter;
- highp vec4 View_GlobalClippingPlane;
- highp vec2 View_FieldOfViewWideAngles;
- highp vec2 View_PrevFieldOfViewWideAngles;
- highp vec4 View_ViewRectMin;
- highp vec4 View_ViewSizeAndInvSize;
- highp vec4 View_BufferSizeAndInvSize;
- highp vec4 View_BufferBilinearUVMinMax;
- int View_NumSceneColorMSAASamples;
- highp float View_PreExposure;
- highp float View_OneOverPreExposure;
- highp float PrePadding_View_2012;
- highp vec4 View_DiffuseOverrideParameter;
- highp vec4 View_SpecularOverrideParameter;
- highp vec4 View_NormalOverrideParameter;
- highp vec2 View_RoughnessOverrideParameter;
- highp float View_PrevFrameGameTime;
- highp float View_PrevFrameRealTime;
- highp float View_OutOfBoundsMask;
- highp float PrePadding_View_2084;
- highp float PrePadding_View_2088;
- highp float PrePadding_View_2092;
- highp vec3 View_WorldCameraMovementSinceLastFrame;
- highp float View_CullingSign;
- highp float View_NearPlane;
- highp float View_AdaptiveTessellationFactor;
- highp float View_GameTime;
- highp float View_RealTime;
- highp float View_MaterialTextureMipBias;
- highp float View_MaterialTextureDerivativeMultiply;
- uint View_Random;
- uint View_FrameNumber;
- uint View_StateFrameIndexMod8;
- highp float View_CameraCut;
- highp float View_UnlitViewmodeMask;
- highp float PrePadding_View_2156;
- highp vec4 View_DirectionalLightColor;
- highp vec3 View_DirectionalLightDirection;
- highp float PrePadding_View_2188;
- highp vec4 View_TranslucencyLightingVolumeMin[2];
- highp vec4 View_TranslucencyLightingVolumeInvSize[2];
- highp vec4 View_TemporalAAParams;
- highp vec4 View_CircleDOFParams;
- highp float View_DepthOfFieldSensorWidth;
- highp float View_DepthOfFieldFocalDistance;
- highp float View_DepthOfFieldScale;
- highp float View_DepthOfFieldFocalLength;
- highp float View_DepthOfFieldFocalRegion;
- highp float View_DepthOfFieldNearTransitionRegion;
- highp float View_DepthOfFieldFarTransitionRegion;
- highp float View_MotionBlurNormalizedToPixel;
- highp float View_bSubsurfacePostprocessEnabled;
- highp float View_GeneralPurposeTweak;
- highp float View_DemosaicVposOffset;
- highp float PrePadding_View_2332;
- highp vec3 View_IndirectLightingColorScale;
- highp float View_HDR32bppEncodingMode;
- highp vec3 View_AtmosphericFogSunDirection;
- highp float View_AtmosphericFogSunPower;
- highp float View_AtmosphericFogPower;
- highp float View_AtmosphericFogDensityScale;
- highp float View_AtmosphericFogDensityOffset;
- highp float View_AtmosphericFogGroundOffset;
- highp float View_AtmosphericFogDistanceScale;
- highp float View_AtmosphericFogAltitudeScale;
- highp float View_AtmosphericFogHeightScaleRayleigh;
- highp float View_AtmosphericFogStartDistance;
- highp float View_AtmosphericFogDistanceOffset;
- highp float View_AtmosphericFogSunDiscScale;
- uint View_AtmosphericFogRenderMask;
- uint View_AtmosphericFogInscatterAltitudeSampleNum;
- highp vec4 View_AtmosphericFogSunColor;
- highp vec3 View_NormalCurvatureToRoughnessScaleBias;
- highp float View_RenderingReflectionCaptureMask;
- highp vec4 View_AmbientCubemapTint;
- highp float View_AmbientCubemapIntensity;
- highp float View_SkyLightParameters;
- highp float PrePadding_View_2472;
- highp float PrePadding_View_2476;
- highp vec4 View_SkyLightColor;
- highp vec4 View_SkyIrradianceEnvironmentMap[7];
- highp float View_MobilePreviewMode;
- highp float View_HMDEyePaddingOffset;
- highp float View_ReflectionCubemapMaxMip;
- highp float View_ShowDecalsMask;
- uint View_DistanceFieldAOSpecularOcclusionMode;
- highp float View_IndirectCapsuleSelfShadowingIntensity;
- highp float PrePadding_View_2632;
- highp float PrePadding_View_2636;
- highp vec3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight;
- int View_StereoPassIndex;
- highp vec4 View_GlobalVolumeCenterAndExtent[4];
- highp vec4 View_GlobalVolumeWorldToUVAddAndMul[4];
- highp float View_GlobalVolumeDimension;
- highp float View_GlobalVolumeTexelSize;
- highp float View_MaxGlobalDistance;
- highp float View_bCheckerboardSubsurfaceProfileRendering;
- highp vec3 View_VolumetricFogInvGridSize;
- highp float PrePadding_View_2812;
- highp vec3 View_VolumetricFogGridZParams;
- highp float PrePadding_View_2828;
- highp vec2 View_VolumetricFogSVPosToVolumeUV;
- highp float View_VolumetricFogMaxDistance;
- highp float PrePadding_View_2844;
- highp vec3 View_VolumetricLightmapWorldToUVScale;
- highp float PrePadding_View_2860;
- highp vec3 View_VolumetricLightmapWorldToUVAdd;
- highp float PrePadding_View_2876;
- highp vec3 View_VolumetricLightmapIndirectionTextureSize;
- highp float View_VolumetricLightmapBrickSize;
- highp vec3 View_VolumetricLightmapBrickTexelSize;
- highp float View_StereoIPD;
- } _595;
- layout(set = 3, binding = 10) uniform highp sampler2D Material_Texture2D_0;
- layout(set = 3, binding = 9) uniform highp sampler2D Material_Texture2D_1;
- layout(set = 3, binding = 8) uniform highp texture2D Material_Texture2D_2;
- layout(set = 3, binding = 11) uniform highp sampler pz0;
- layout(set = 3, binding = 7) uniform highp texture2D Material_Texture2D_3;
- layout(set = 3, binding = 6) uniform highp samplerCube ReflectionCubemap;
- layout(location = 1) in highp vec4 in_TEXCOORD11;
- layout(location = 0) in highp vec4 in_TEXCOORD10;
- layout(location = 4) in highp vec4 in_TEXCOORD8;
- layout(location = 3) in highp vec2 in_TEXCOORD0;
- layout(location = 0) out highp vec4 out_Target0;
- void main()
- {
- highp vec3 v0 = _16.pu_h[1].xyz;
- highp vec3 v2 = cross(in_TEXCOORD11.xyz, in_TEXCOORD10.xyz) * in_TEXCOORD11.www;
- highp vec3 v3 = normalize(-in_TEXCOORD8.xyz);
- highp vec2 v4 = (texture(Material_Texture2D_0, in_TEXCOORD0).xy * vec2(2.0)) + vec2(-1.0);
- highp vec4 v5;
- v5.w = 1.0;
- v5 = vec4(v4.x, v4.y, v5.z, v5.w);
- v5.z = sqrt(clamp(1.0 + (-dot(v4, v4)), 0.0, 1.0));
- highp vec2 v6 = v4 * vec2(-1.0);
- highp vec3 v7;
- v7 = vec3(v6.x, v6.y, v7.z);
- v7.z = v5.z;
- highp vec3 v8;
- v8 = vec3(v6.x, v6.y, v8.z);
- v8.z = v5.z;
- highp vec3 v9 = (vec3(0.0, 0.0, 2.0) * vec3(dot(vec3(0.0, 0.0, 2.0), v7))) + (-(vec3(2.0) * v8));
- highp float f11 = length(v9);
- highp vec3 v10 = v9 / vec3(f11);
- highp vec3 v12 = normalize((in_TEXCOORD11.xyz * v10.zzz) + ((v2 * v10.yyy) + (in_TEXCOORD10.xyz * v10.xxx)));
- highp vec3 v13 = (-v3) + ((v12 * vec3(dot(v12, v3))) * vec3(2.0));
- highp vec4 v14 = texture(Material_Texture2D_1, in_TEXCOORD0);
- highp vec3 v15 = _154.Material_VectorExpressions[2].xyz;
- if (false)
- {
- discard;
- }
- highp vec3 v16 = clamp(mix(mix(mix(_154.Material_VectorExpressions[4].xyz, _154.Material_VectorExpressions[4].xyz, v14.yyy), texture(sampler2D(Material_Texture2D_2, pz0), vec2(8.0) * in_TEXCOORD0).xyz * vec3(0.25), v14.xxx), texture(sampler2D(Material_Texture2D_3, pz0), vec2(50.0) * in_TEXCOORD0).xyz * vec3(0.2249999940395355224609375), v14.zzz), vec3(0.0), vec3(1.0));
- highp float f17 = clamp(mix(mix(vec3(0.0), vec3(1.0), v14.xxx), vec3(0.0), v14.zzz).x, 0.0, 1.0);
- highp vec3 v18 = v16 + (-(v16 * vec3(f17)));
- highp vec3 v19 = vec3(0.039999999105930328369140625 + (-(0.039999999105930328369140625 * f17))) + (v16 * vec3(f17));
- highp float f20 = clamp(mix(mix(vec3(0.100000001490116119384765625), vec3(mix(0.37999999523162841796875, 0.550000011920928955078125, texture(sampler2D(Material_Texture2D_2, pz0), vec2(8.0) * in_TEXCOORD0).x)), v14.xxx), vec3(mix(0.550000011920928955078125, 0.75, texture(sampler2D(Material_Texture2D_3, pz0), vec2(50.0) * in_TEXCOORD0).x)), v14.zzz).x, 0.119999997317790985107421875, 1.0);
- highp vec4 v23 = (vec4(f20) * vec4(-1.0, -0.0274999998509883880615234375, -0.572000026702880859375, 0.02199999988079071044921875)) + vec4(1.0, 0.0425000004470348358154296875, 1.03999996185302734375, -0.039999999105930328369140625);
- highp vec2 v24 = (vec2(-1.03999996185302734375, 1.03999996185302734375) * vec2((min(v23.x * v23.x, exp2((-9.27999973297119140625) * max(dot(v12, v3), 0.0))) * v23.x) + v23.y)) + v23.zw;
- highp vec2 v22 = v24;
- v22.y = v24.y * clamp(50.0 * v19.y, 0.0, 1.0);
- highp vec3 v21 = (v19 * v24.xxx) + v22.yyy;
- highp vec4 v27;
- v27.x = 0.2820949852466583251953125;
- v27.y = (-0.48860299587249755859375) * v12.y;
- v27.z = 0.48860299587249755859375 * v12.z;
- v27.w = (-0.48860299587249755859375) * v12.x;
- highp vec3 v29 = v12 * v12;
- highp vec4 v28;
- v28.x = (1.09254801273345947265625 * v12.x) * v12.y;
- v28.y = ((-1.09254801273345947265625) * v12.y) * v12.z;
- v28.z = 0.3153919875621795654296875 * ((3.0 * v29.z) + (-1.0));
- v28.w = ((-1.09254801273345947265625) * v12.x) * v12.z;
- highp vec4 v25 = v27;
- v25.x = 0.88622748851776123046875;
- highp vec3 _397 = v27.yzw * vec3(2.0943949222564697265625);
- v25 = vec4(v25.x, _397.x, _397.y, _397.z);
- highp vec4 v26 = v28 * vec4(0.785398185253143310546875);
- highp float f30 = 0.4290426075458526611328125 * (v29.x + (-v29.y));
- highp vec3 v31 = vec3(0.0);
- v31.x = (dot(_421.PrecomputedLightingBuffer_IndirectLightingSHCoefficients0[0], v25) + dot(_421.PrecomputedLightingBuffer_IndirectLightingSHCoefficients1[0], v26)) + (_421.PrecomputedLightingBuffer_IndirectLightingSHCoefficients2.x * f30);
- v31.y = (dot(_421.PrecomputedLightingBuffer_IndirectLightingSHCoefficients0[1], v25) + dot(_421.PrecomputedLightingBuffer_IndirectLightingSHCoefficients1[1], v26)) + (_421.PrecomputedLightingBuffer_IndirectLightingSHCoefficients2.y * f30);
- v31.z = (dot(_421.PrecomputedLightingBuffer_IndirectLightingSHCoefficients0[2], v25) + dot(_421.PrecomputedLightingBuffer_IndirectLightingSHCoefficients1[2], v26)) + (_421.PrecomputedLightingBuffer_IndirectLightingSHCoefficients2.z * f30);
- highp vec3 v32 = max(vec3(0.0), v31);
- highp float f33 = dot(v32, vec3(0.300000011920928955078125, 0.589999973773956298828125, 0.10999999940395355224609375));
- highp vec3 v34 = v18 * v32;
- highp float _486;
- if (_490.Primitive_UseSingleSampleShadowFromStationaryLights > 0.0)
- {
- _486 = _421.PrecomputedLightingBuffer_DirectionalLightShadowing;
- }
- else
- {
- _486 = 1.0;
- }
- highp float f35 = _486;
- highp vec3 v36 = normalize(v3 + _508.MobileDirectionalLight_DirectionalLightDirection);
- highp vec3 v37 = cross(v12, v36);
- highp float f38 = f20 * f20;
- highp float f39 = max(0.0, dot(v12, v36)) * f38;
- highp float f40 = f38 / (dot(v37, v37) + (f39 * f39));
- highp vec3 v41 = v34 + ((vec3(f35 * max(0.0, dot(v12, _508.MobileDirectionalLight_DirectionalLightDirection))) * _508.MobileDirectionalLight_DirectionalLightColor.xyz) * (v18 + (v21 * vec3(((f20 * 0.25) + 0.25) * min(f40 * f40, 65504.0)))));
- highp float f44 = float(_16.pu_h[0].x > 0.0);
- highp float f43 = f44;
- highp float f46 = _16.pu_h[0].x;
- highp float _580;
- if (f43 != 0.0)
- {
- _580 = f46;
- }
- else
- {
- _580 = _595.View_ReflectionCubemapMaxMip;
- }
- highp float f45 = _580;
- highp vec4 v47 = textureLod(ReflectionCubemap, v13, (f45 + (-1.0)) + (-(1.0 + (-(1.2000000476837158203125 * log2(f20))))));
- highp vec3 v42;
- if (f43 != 0.0)
- {
- v42 = v47.xyz * _595.View_SkyLightColor.xyz;
- }
- else
- {
- highp vec3 v48 = v47.xyz * vec3(v47.w * 16.0);
- v42 = (v48 * v48) * v0.xxx;
- }
- highp vec3 _657 = (v41 + ((v42 * vec3(f33)) * v21)) + max(v15, vec3(0.0));
- highp vec4 v1;
- v1 = vec4(_657.x, _657.y, _657.z, v1.w);
- v1.w = 0.0;
- v1.w = in_TEXCOORD8.w;
- out_Target0 = v1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement