Advertisement
Guest User

bridge.frag

a guest
Jul 9th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #version 310 es
  2. precision mediump float;
  3. precision highp int;
  4.  
  5. layout(set = 3, binding = 0, std140) uniform HLSLCC_CBh
  6. {
  7.     highp vec4 pu_h[2];
  8. } _16;
  9.  
  10. layout(set = 3, binding = 3, std140) uniform Material
  11. {
  12.     highp vec4 Material_VectorExpressions[3];
  13.     highp vec4 Material_ScalarExpressions[1];
  14. } _288;
  15.  
  16. layout(set = 3, binding = 2, std140) uniform PrecomputedLightingBuffer
  17. {
  18.     highp vec3 PrecomputedLightingBuffer_IndirectLightingCachePrimitiveAdd;
  19.     highp float PrePadding_PrecomputedLightingBuffer_12;
  20.     highp vec3 PrecomputedLightingBuffer_IndirectLightingCachePrimitiveScale;
  21.     highp float PrePadding_PrecomputedLightingBuffer_28;
  22.     highp vec3 PrecomputedLightingBuffer_IndirectLightingCacheMinUV;
  23.     highp float PrePadding_PrecomputedLightingBuffer_44;
  24.     highp vec3 PrecomputedLightingBuffer_IndirectLightingCacheMaxUV;
  25.     highp float PrePadding_PrecomputedLightingBuffer_60;
  26.     highp vec4 PrecomputedLightingBuffer_PointSkyBentNormal;
  27.     highp float PrecomputedLightingBuffer_DirectionalLightShadowing;
  28.     highp float PrePadding_PrecomputedLightingBuffer_84;
  29.     highp float PrePadding_PrecomputedLightingBuffer_88;
  30.     highp float PrePadding_PrecomputedLightingBuffer_92;
  31.     highp vec4 PrecomputedLightingBuffer_StaticShadowMapMasks;
  32.     highp vec4 PrecomputedLightingBuffer_InvUniformPenumbraSizes;
  33.     highp vec4 PrecomputedLightingBuffer_IndirectLightingSHCoefficients0[3];
  34.     highp vec4 PrecomputedLightingBuffer_IndirectLightingSHCoefficients1[3];
  35.     highp vec4 PrecomputedLightingBuffer_IndirectLightingSHCoefficients2;
  36.     highp vec4 PrecomputedLightingBuffer_IndirectLightingSHSingleCoefficient;
  37.     highp vec4 PrecomputedLightingBuffer_LightMapCoordinateScaleBias;
  38.     highp vec4 PrecomputedLightingBuffer_ShadowMapCoordinateScaleBias;
  39.     highp vec4 PrecomputedLightingBuffer_LightMapScale[2];
  40.     highp vec4 PrecomputedLightingBuffer_LightMapAdd[2];
  41. } _454;
  42.  
  43. layout(set = 3, binding = 1, std140) uniform View
  44. {
  45.     highp mat4 View_TranslatedWorldToClip;
  46.     highp mat4 View_WorldToClip;
  47.     highp mat4 View_TranslatedWorldToView;
  48.     highp mat4 View_ViewToTranslatedWorld;
  49.     highp mat4 View_TranslatedWorldToCameraView;
  50.     highp mat4 View_CameraViewToTranslatedWorld;
  51.     highp mat4 View_ViewToClip;
  52.     highp mat4 View_ViewToClipNoAA;
  53.     highp mat4 View_ClipToView;
  54.     highp mat4 View_ClipToTranslatedWorld;
  55.     highp mat4 View_SVPositionToTranslatedWorld;
  56.     highp mat4 View_ScreenToWorld;
  57.     highp mat4 View_ScreenToTranslatedWorld;
  58.     highp vec3 View_ViewForward;
  59.     highp float PrePadding_View_844;
  60.     highp vec3 View_ViewUp;
  61.     highp float PrePadding_View_860;
  62.     highp vec3 View_ViewRight;
  63.     highp float PrePadding_View_876;
  64.     highp vec3 View_HMDViewNoRollUp;
  65.     highp float PrePadding_View_892;
  66.     highp vec3 View_HMDViewNoRollRight;
  67.     highp float PrePadding_View_908;
  68.     highp vec4 View_InvDeviceZToWorldZTransform;
  69.     highp vec4 View_ScreenPositionScaleBias;
  70.     highp vec3 View_WorldCameraOrigin;
  71.     highp float PrePadding_View_956;
  72.     highp vec3 View_TranslatedWorldCameraOrigin;
  73.     highp float PrePadding_View_972;
  74.     highp vec3 View_WorldViewOrigin;
  75.     highp float PrePadding_View_988;
  76.     highp vec3 View_PreViewTranslation;
  77.     highp float PrePadding_View_1004;
  78.     highp mat4 View_PrevProjection;
  79.     highp mat4 View_PrevViewProj;
  80.     highp mat4 View_PrevViewRotationProj;
  81.     highp mat4 View_PrevViewToClip;
  82.     highp mat4 View_PrevClipToView;
  83.     highp mat4 View_PrevTranslatedWorldToClip;
  84.     highp mat4 View_PrevTranslatedWorldToView;
  85.     highp mat4 View_PrevViewToTranslatedWorld;
  86.     highp mat4 View_PrevTranslatedWorldToCameraView;
  87.     highp mat4 View_PrevCameraViewToTranslatedWorld;
  88.     highp vec3 View_PrevWorldCameraOrigin;
  89.     highp float PrePadding_View_1660;
  90.     highp vec3 View_PrevWorldViewOrigin;
  91.     highp float PrePadding_View_1676;
  92.     highp vec3 View_PrevPreViewTranslation;
  93.     highp float PrePadding_View_1692;
  94.     highp mat4 View_PrevInvViewProj;
  95.     highp mat4 View_PrevScreenToTranslatedWorld;
  96.     highp mat4 View_ClipToPrevClip;
  97.     highp vec4 View_TemporalAAJitter;
  98.     highp vec4 View_GlobalClippingPlane;
  99.     highp vec2 View_FieldOfViewWideAngles;
  100.     highp vec2 View_PrevFieldOfViewWideAngles;
  101.     highp vec4 View_ViewRectMin;
  102.     highp vec4 View_ViewSizeAndInvSize;
  103.     highp vec4 View_BufferSizeAndInvSize;
  104.     highp vec4 View_BufferBilinearUVMinMax;
  105.     int View_NumSceneColorMSAASamples;
  106.     highp float View_PreExposure;
  107.     highp float View_OneOverPreExposure;
  108.     highp float PrePadding_View_2012;
  109.     highp vec4 View_DiffuseOverrideParameter;
  110.     highp vec4 View_SpecularOverrideParameter;
  111.     highp vec4 View_NormalOverrideParameter;
  112.     highp vec2 View_RoughnessOverrideParameter;
  113.     highp float View_PrevFrameGameTime;
  114.     highp float View_PrevFrameRealTime;
  115.     highp float View_OutOfBoundsMask;
  116.     highp float PrePadding_View_2084;
  117.     highp float PrePadding_View_2088;
  118.     highp float PrePadding_View_2092;
  119.     highp vec3 View_WorldCameraMovementSinceLastFrame;
  120.     highp float View_CullingSign;
  121.     highp float View_NearPlane;
  122.     highp float View_AdaptiveTessellationFactor;
  123.     highp float View_GameTime;
  124.     highp float View_RealTime;
  125.     highp float View_MaterialTextureMipBias;
  126.     highp float View_MaterialTextureDerivativeMultiply;
  127.     uint View_Random;
  128.     uint View_FrameNumber;
  129.     uint View_StateFrameIndexMod8;
  130.     highp float View_CameraCut;
  131.     highp float View_UnlitViewmodeMask;
  132.     highp float PrePadding_View_2156;
  133.     highp vec4 View_DirectionalLightColor;
  134.     highp vec3 View_DirectionalLightDirection;
  135.     highp float PrePadding_View_2188;
  136.     highp vec4 View_TranslucencyLightingVolumeMin[2];
  137.     highp vec4 View_TranslucencyLightingVolumeInvSize[2];
  138.     highp vec4 View_TemporalAAParams;
  139.     highp vec4 View_CircleDOFParams;
  140.     highp float View_DepthOfFieldSensorWidth;
  141.     highp float View_DepthOfFieldFocalDistance;
  142.     highp float View_DepthOfFieldScale;
  143.     highp float View_DepthOfFieldFocalLength;
  144.     highp float View_DepthOfFieldFocalRegion;
  145.     highp float View_DepthOfFieldNearTransitionRegion;
  146.     highp float View_DepthOfFieldFarTransitionRegion;
  147.     highp float View_MotionBlurNormalizedToPixel;
  148.     highp float View_bSubsurfacePostprocessEnabled;
  149.     highp float View_GeneralPurposeTweak;
  150.     highp float View_DemosaicVposOffset;
  151.     highp float PrePadding_View_2332;
  152.     highp vec3 View_IndirectLightingColorScale;
  153.     highp float View_HDR32bppEncodingMode;
  154.     highp vec3 View_AtmosphericFogSunDirection;
  155.     highp float View_AtmosphericFogSunPower;
  156.     highp float View_AtmosphericFogPower;
  157.     highp float View_AtmosphericFogDensityScale;
  158.     highp float View_AtmosphericFogDensityOffset;
  159.     highp float View_AtmosphericFogGroundOffset;
  160.     highp float View_AtmosphericFogDistanceScale;
  161.     highp float View_AtmosphericFogAltitudeScale;
  162.     highp float View_AtmosphericFogHeightScaleRayleigh;
  163.     highp float View_AtmosphericFogStartDistance;
  164.     highp float View_AtmosphericFogDistanceOffset;
  165.     highp float View_AtmosphericFogSunDiscScale;
  166.     uint View_AtmosphericFogRenderMask;
  167.     uint View_AtmosphericFogInscatterAltitudeSampleNum;
  168.     highp vec4 View_AtmosphericFogSunColor;
  169.     highp vec3 View_NormalCurvatureToRoughnessScaleBias;
  170.     highp float View_RenderingReflectionCaptureMask;
  171.     highp vec4 View_AmbientCubemapTint;
  172.     highp float View_AmbientCubemapIntensity;
  173.     highp float View_SkyLightParameters;
  174.     highp float PrePadding_View_2472;
  175.     highp float PrePadding_View_2476;
  176.     highp vec4 View_SkyLightColor;
  177.     highp vec4 View_SkyIrradianceEnvironmentMap[7];
  178.     highp float View_MobilePreviewMode;
  179.     highp float View_HMDEyePaddingOffset;
  180.     highp float View_ReflectionCubemapMaxMip;
  181.     highp float View_ShowDecalsMask;
  182.     uint View_DistanceFieldAOSpecularOcclusionMode;
  183.     highp float View_IndirectCapsuleSelfShadowingIntensity;
  184.     highp float PrePadding_View_2632;
  185.     highp float PrePadding_View_2636;
  186.     highp vec3 View_ReflectionEnvironmentRoughnessMixingScaleBiasAndLargestWeight;
  187.     int View_StereoPassIndex;
  188.     highp vec4 View_GlobalVolumeCenterAndExtent[4];
  189.     highp vec4 View_GlobalVolumeWorldToUVAddAndMul[4];
  190.     highp float View_GlobalVolumeDimension;
  191.     highp float View_GlobalVolumeTexelSize;
  192.     highp float View_MaxGlobalDistance;
  193.     highp float View_bCheckerboardSubsurfaceProfileRendering;
  194.     highp vec3 View_VolumetricFogInvGridSize;
  195.     highp float PrePadding_View_2812;
  196.     highp vec3 View_VolumetricFogGridZParams;
  197.     highp float PrePadding_View_2828;
  198.     highp vec2 View_VolumetricFogSVPosToVolumeUV;
  199.     highp float View_VolumetricFogMaxDistance;
  200.     highp float PrePadding_View_2844;
  201.     highp vec3 View_VolumetricLightmapWorldToUVScale;
  202.     highp float PrePadding_View_2860;
  203.     highp vec3 View_VolumetricLightmapWorldToUVAdd;
  204.     highp float PrePadding_View_2876;
  205.     highp vec3 View_VolumetricLightmapIndirectionTextureSize;
  206.     highp float View_VolumetricLightmapBrickSize;
  207.     highp vec3 View_VolumetricLightmapBrickTexelSize;
  208.     highp float View_StereoIPD;
  209. } _553;
  210.  
  211. layout(set = 3, binding = 8) uniform highp sampler2D Material_Texture2D_0;
  212. layout(set = 3, binding = 7) uniform highp sampler2D Material_Texture2D_1;
  213. layout(set = 3, binding = 6) uniform highp sampler2D Material_Texture2D_2;
  214. layout(set = 3, binding = 5) uniform highp sampler2D Material_Texture2D_3;
  215. layout(set = 3, binding = 9) uniform highp sampler2D PrecomputedLightingBuffer_LightMapTexture;
  216. layout(set = 3, binding = 4) uniform highp samplerCube ReflectionCubemap;
  217.  
  218. layout(location = 1) in highp vec4 in_TEXCOORD11;
  219. layout(location = 0) in highp vec4 in_TEXCOORD10;
  220. layout(location = 6) in highp vec4 in_TEXCOORD8;
  221. layout(location = 3) in highp vec4 in_TEXCOORD0;
  222. layout(location = 4) in highp vec4 in_TEXCOORD1;
  223. layout(location = 2) in highp vec4 in_COLOR0;
  224. layout(location = 5) in highp vec4 in_TEXCOORD4;
  225. layout(location = 0) out highp vec4 out_Target0;
  226.  
  227. void main()
  228. {
  229.     highp vec3 v0 = _16.pu_h[1].xyz;
  230.     highp vec3 v2 = cross(in_TEXCOORD11.xyz, in_TEXCOORD10.xyz) * in_TEXCOORD11.www;
  231.     highp vec3 v3 = normalize(-in_TEXCOORD8.xyz);
  232.     highp vec2 v4 = (texture(Material_Texture2D_0, in_TEXCOORD0.zw).xy * vec2(2.0)) + vec2(-1.0);
  233.     highp vec4 v5;
  234.     v5.w = 1.0;
  235.     v5 = vec4(v4.x, v4.y, v5.z, v5.w);
  236.     v5.z = sqrt(clamp(1.0 + (-dot(v4, v4)), 0.0, 1.0));
  237.     highp float f6 = v5.z + 1.0;
  238.     highp vec2 v7 = (texture(Material_Texture2D_0, in_TEXCOORD1.xy).xy * vec2(2.0)) + vec2(-1.0);
  239.     highp vec4 v8;
  240.     v8.w = 1.0;
  241.     v8 = vec4(v7.x, v7.y, v8.z, v8.w);
  242.     v8.z = sqrt(clamp(1.0 + (-dot(v7, v7)), 0.0, 1.0));
  243.     highp vec2 v9 = v7 * vec2(-1.0);
  244.     highp vec3 v10;
  245.     v10 = vec3(v4.x, v4.y, v10.z);
  246.     v10.z = f6;
  247.     highp vec3 v11;
  248.     v11 = vec3(v9.x, v9.y, v11.z);
  249.     v11.z = v8.z;
  250.     highp vec3 v12;
  251.     v12 = vec3(v4.x, v4.y, v12.z);
  252.     v12.z = f6;
  253.     highp vec3 v13;
  254.     v13 = vec3(v9.x, v9.y, v13.z);
  255.     v13.z = v8.z;
  256.     highp vec2 v14 = (texture(Material_Texture2D_1, in_TEXCOORD0.xy).xy * vec2(2.0)) + vec2(-1.0);
  257.     highp vec4 v15;
  258.     v15.w = 1.0;
  259.     v15 = vec4(v14.x, v14.y, v15.z, v15.w);
  260.     v15.z = sqrt(clamp(1.0 + (-dot(v14, v14)), 0.0, 1.0));
  261.     highp vec2 v16 = (texture(Material_Texture2D_1, in_TEXCOORD0.xy).xy * vec2(2.0)) + vec2(-1.0);
  262.     highp float f17 = sqrt(clamp(1.0 + (-dot(v16, v16)), 0.0, 1.0));
  263.     highp vec4 v18 = texture(Material_Texture2D_2, in_TEXCOORD0.xy);
  264.     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)));
  265.     highp float f20 = dot(v19, v19);
  266.     highp vec4 v21;
  267.     v21.w = 0.0;
  268.     highp float f22 = length(v19);
  269.     highp vec3 _233 = v19 / vec3(f22);
  270.     v21 = vec4(_233.x, _233.y, _233.z, v21.w);
  271.     highp vec4 v23 = mix(vec4(0.0, 0.0, 1.0, 1.0), v21, bvec4(f20 >= 9.9999999747524270787835121154785e-07));
  272.     highp vec3 v24 = normalize((in_TEXCOORD11.xyz * v23.zzz) + ((v2 * v23.yyy) + (in_TEXCOORD10.xyz * v23.xxx)));
  273.     highp vec3 v25 = (-v3) + ((v24 * vec3(dot(v24, v3))) * vec3(2.0));
  274.     highp vec3 v26 = texture(Material_Texture2D_3, in_TEXCOORD0.xy).xyz * _288.Material_ScalarExpressions[0].xxx;
  275.     highp vec3 v27 = _288.Material_VectorExpressions[2].xyz;
  276.     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));
  277.     highp float f29 = clamp(_288.Material_ScalarExpressions[0].y, 0.0, 1.0);
  278.     highp vec3 v30 = vec3(0.039999999105930328369140625 + (-(0.039999999105930328369140625 * f29))) + (v28 * vec3(f29));
  279.     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);
  280.     highp vec4 v34 = (vec4(f31) * vec4(-1.0, -0.0274999998509883880615234375, -0.572000026702880859375, 0.02199999988079071044921875)) + vec4(1.0, 0.0425000004470348358154296875, 1.03999996185302734375, -0.039999999105930328369140625);
  281.     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;
  282.     highp vec2 v33 = v35;
  283.     v33.y = v35.y * clamp(50.0 * v30.y, 0.0, 1.0);
  284.     highp vec3 v32 = (v30 * v35.xxx) + v33.yyy;
  285.     highp vec2 v36 = in_TEXCOORD4.xy * vec2(1.0, 0.5);
  286.     highp vec3 v37 = (texture(PrecomputedLightingBuffer_LightMapTexture, v36).xyz * _454.PrecomputedLightingBuffer_LightMapScale[0].xyz) + _454.PrecomputedLightingBuffer_LightMapAdd[0].xyz;
  287.     highp float f38 = dot(v37, vec3(0.300000011920928955078125, 0.589999973773956298828125, 0.10999999940395355224609375));
  288.     highp vec4 v39;
  289.     v39.w = 1.0;
  290.     v39 = vec4(v24.yzx.x, v24.yzx.y, v24.yzx.z, v39.w);
  291.     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));
  292.     highp vec3 v41 = v37 * vec3(f40 / f38);
  293.     highp vec4 v42;
  294.     v42 = vec4(v41.x, v41.y, v41.z, v42.w);
  295.     v42.w = f40;
  296.     highp vec3 v43 = v41 * (v28 + (-(v28 * vec3(f29))));
  297.     highp float f46 = float(_16.pu_h[0].x > 0.0);
  298.     highp float f45 = f46;
  299.     highp float f48 = _16.pu_h[0].x;
  300.     highp float _536;
  301.     if (f45 != 0.0)
  302.     {
  303.         _536 = f48;
  304.     }
  305.     else
  306.     {
  307.         _536 = _553.View_ReflectionCubemapMaxMip;
  308.     }
  309.     highp float f47 = _536;
  310.     highp vec4 v49 = textureLod(ReflectionCubemap, v25, (f47 + (-1.0)) + (-(1.0 + (-(1.2000000476837158203125 * log2(f31))))));
  311.     highp vec3 v44;
  312.     if (f45 != 0.0)
  313.     {
  314.         v44 = v49.xyz * _553.View_SkyLightColor.xyz;
  315.     }
  316.     else
  317.     {
  318.         highp vec3 v50 = v49.xyz * vec3(v49.w * 16.0);
  319.         v44 = (v50 * v50) * v0.xxx;
  320.     }
  321.     highp vec3 _614 = (v43 + ((v44 * v42.www) * v32)) + max(v27, vec3(0.0));
  322.     highp vec4 v1;
  323.     v1 = vec4(_614.x, _614.y, _614.z, v1.w);
  324.     v1.w = 0.0;
  325.     v1.w = in_TEXCOORD8.w;
  326.     out_Target0 = v1;
  327. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement