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 = 3, std140) uniform Material
- {
- highp vec4 Material_VectorExpressions[3];
- highp vec4 Material_ScalarExpressions[1];
- } _288;
- layout(set = 3, binding = 2, 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];
- } _454;
- 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;
- } _553;
- layout(set = 3, binding = 8) uniform highp sampler2D Material_Texture2D_0;
- layout(set = 3, binding = 7) uniform highp sampler2D Material_Texture2D_1;
- layout(set = 3, binding = 6) uniform highp sampler2D Material_Texture2D_2;
- layout(set = 3, binding = 5) uniform highp sampler2D Material_Texture2D_3;
- layout(set = 3, binding = 9) uniform highp sampler2D PrecomputedLightingBuffer_LightMapTexture;
- layout(set = 3, binding = 4) uniform highp samplerCube ReflectionCubemap;
- layout(location = 1) in highp vec4 in_TEXCOORD11;
- layout(location = 0) in highp vec4 in_TEXCOORD10;
- layout(location = 6) in highp vec4 in_TEXCOORD8;
- layout(location = 3) in highp vec4 in_TEXCOORD0;
- layout(location = 4) in highp vec4 in_TEXCOORD1;
- layout(location = 2) in highp vec4 in_COLOR0;
- layout(location = 5) in highp vec4 in_TEXCOORD4;
- 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.zw).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 float f6 = v5.z + 1.0;
- highp vec2 v7 = (texture(Material_Texture2D_0, in_TEXCOORD1.xy).xy * vec2(2.0)) + vec2(-1.0);
- highp vec4 v8;
- v8.w = 1.0;
- v8 = vec4(v7.x, v7.y, v8.z, v8.w);
- v8.z = sqrt(clamp(1.0 + (-dot(v7, v7)), 0.0, 1.0));
- highp vec2 v9 = v7 * vec2(-1.0);
- highp vec3 v10;
- v10 = vec3(v4.x, v4.y, v10.z);
- v10.z = f6;
- highp vec3 v11;
- v11 = vec3(v9.x, v9.y, v11.z);
- v11.z = v8.z;
- highp vec3 v12;
- v12 = vec3(v4.x, v4.y, v12.z);
- v12.z = f6;
- highp vec3 v13;
- v13 = vec3(v9.x, v9.y, v13.z);
- v13.z = v8.z;
- highp vec2 v14 = (texture(Material_Texture2D_1, in_TEXCOORD0.xy).xy * vec2(2.0)) + vec2(-1.0);
- highp vec4 v15;
- v15.w = 1.0;
- v15 = vec4(v14.x, v14.y, v15.z, v15.w);
- v15.z = sqrt(clamp(1.0 + (-dot(v14, v14)), 0.0, 1.0));
- highp vec2 v16 = (texture(Material_Texture2D_1, in_TEXCOORD0.xy).xy * vec2(2.0)) + vec2(-1.0);
- highp float f17 = sqrt(clamp(1.0 + (-dot(v16, v16)), 0.0, 1.0));
- highp vec4 v18 = texture(Material_Texture2D_2, in_TEXCOORD0.xy);
- highp vec3 v19 = mix(((v12 * vec3(dot(v10, v11))) + (-(vec3(f6) * v13))) * vec3(0.02999999932944774627685546875, 0.02999999932944774627685546875, 1.0), v15.xyz, vec3(min(max(((in_COLOR0.z * 2.5) + (-min(max(((1.0 + (-f17)) * 0.20000000298023223876953125) + v18.x, 0.0), 1.0))) / 0.5, 0.0), 1.0)));
- highp float f20 = dot(v19, v19);
- highp vec4 v21;
- v21.w = 0.0;
- highp float f22 = length(v19);
- highp vec3 _233 = v19 / vec3(f22);
- v21 = vec4(_233.x, _233.y, _233.z, v21.w);
- highp vec4 v23 = mix(vec4(0.0, 0.0, 1.0, 1.0), v21, bvec4(f20 >= 9.9999999747524270787835121154785e-07));
- highp vec3 v24 = normalize((in_TEXCOORD11.xyz * v23.zzz) + ((v2 * v23.yyy) + (in_TEXCOORD10.xyz * v23.xxx)));
- highp vec3 v25 = (-v3) + ((v24 * vec3(dot(v24, v3))) * vec3(2.0));
- highp vec3 v26 = texture(Material_Texture2D_3, in_TEXCOORD0.xy).xyz * _288.Material_ScalarExpressions[0].xxx;
- highp vec3 v27 = _288.Material_VectorExpressions[2].xyz;
- highp vec3 v28 = clamp(mix(vec3(0.20000000298023223876953125) * v26, v26, vec3(min(max(((in_COLOR0.z * 2.5) + (-min(max(((1.0 + (-f17)) * 0.20000000298023223876953125) + v18.x, 0.0), 1.0))) + (-1.0), 0.0), 1.0))), vec3(0.0), vec3(1.0));
- highp float f29 = clamp(_288.Material_ScalarExpressions[0].y, 0.0, 1.0);
- highp vec3 v30 = vec3(0.039999999105930328369140625 + (-(0.039999999105930328369140625 * f29))) + (v28 * vec3(f29));
- highp float f31 = clamp(mix(vec3(0.0), vec3(min(max(mix(_288.Material_ScalarExpressions[0].w, _288.Material_ScalarExpressions[0].z, texture(Material_Texture2D_2, in_TEXCOORD0.xy).x), 0.0), 1.0)), vec3(min(max((in_COLOR0.z * 2.5) + (-min(max(((1.0 + (-f17)) * 0.20000000298023223876953125) + v18.x, 0.0), 1.0)), 0.0), 1.0))).x, 0.119999997317790985107421875, 1.0);
- highp vec4 v34 = (vec4(f31) * vec4(-1.0, -0.0274999998509883880615234375, -0.572000026702880859375, 0.02199999988079071044921875)) + vec4(1.0, 0.0425000004470348358154296875, 1.03999996185302734375, -0.039999999105930328369140625);
- highp vec2 v35 = (vec2(-1.03999996185302734375, 1.03999996185302734375) * vec2((min(v34.x * v34.x, exp2((-9.27999973297119140625) * max(dot(v24, v3), 0.0))) * v34.x) + v34.y)) + v34.zw;
- highp vec2 v33 = v35;
- v33.y = v35.y * clamp(50.0 * v30.y, 0.0, 1.0);
- highp vec3 v32 = (v30 * v35.xxx) + v33.yyy;
- highp vec2 v36 = in_TEXCOORD4.xy * vec2(1.0, 0.5);
- highp vec3 v37 = (texture(PrecomputedLightingBuffer_LightMapTexture, v36).xyz * _454.PrecomputedLightingBuffer_LightMapScale[0].xyz) + _454.PrecomputedLightingBuffer_LightMapAdd[0].xyz;
- highp float f38 = dot(v37, vec3(0.300000011920928955078125, 0.589999973773956298828125, 0.10999999940395355224609375));
- highp vec4 v39;
- v39.w = 1.0;
- v39 = vec4(v24.yzx.x, v24.yzx.y, v24.yzx.z, v39.w);
- highp float f40 = (exp2((f38 * 16.0) + (-8.0)) + (-0.00390625)) * max(0.0, dot((texture(PrecomputedLightingBuffer_LightMapTexture, v36 + vec2(0.0, 0.5)) * _454.PrecomputedLightingBuffer_LightMapScale[1]) + _454.PrecomputedLightingBuffer_LightMapAdd[1], v39));
- highp vec3 v41 = v37 * vec3(f40 / f38);
- highp vec4 v42;
- v42 = vec4(v41.x, v41.y, v41.z, v42.w);
- v42.w = f40;
- highp vec3 v43 = v41 * (v28 + (-(v28 * vec3(f29))));
- highp float f46 = float(_16.pu_h[0].x > 0.0);
- highp float f45 = f46;
- highp float f48 = _16.pu_h[0].x;
- highp float _536;
- if (f45 != 0.0)
- {
- _536 = f48;
- }
- else
- {
- _536 = _553.View_ReflectionCubemapMaxMip;
- }
- highp float f47 = _536;
- highp vec4 v49 = textureLod(ReflectionCubemap, v25, (f47 + (-1.0)) + (-(1.0 + (-(1.2000000476837158203125 * log2(f31))))));
- highp vec3 v44;
- if (f45 != 0.0)
- {
- v44 = v49.xyz * _553.View_SkyLightColor.xyz;
- }
- else
- {
- highp vec3 v50 = v49.xyz * vec3(v49.w * 16.0);
- v44 = (v50 * v50) * v0.xxx;
- }
- highp vec3 _614 = (v43 + ((v44 * v42.www) * v32)) + max(v27, vec3(0.0));
- highp vec4 v1;
- v1 = vec4(_614.x, _614.y, _614.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