From ef6bde658021dae7732d9b628d58b2e0905c938c Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Mon, 17 Jan 2022 12:49:02 +0100 Subject: Do not forward expressions which carry a huge amount of dependencies. Need to force temporaries eventually, or compilers have a tendency to explode. --- reference/shaders-ue4/asm/frag/depth-compare.asm.frag | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'reference/shaders-ue4/asm/frag/depth-compare.asm.frag') diff --git a/reference/shaders-ue4/asm/frag/depth-compare.asm.frag b/reference/shaders-ue4/asm/frag/depth-compare.asm.frag index 9ee2d89b..5f336c3d 100644 --- a/reference/shaders-ue4/asm/frag/depth-compare.asm.frag +++ b/reference/shaders-ue4/asm/frag/depth-compare.asm.frag @@ -254,6 +254,7 @@ fragment main0_out main0(constant type_View& View [[buffer(0)]], constant type_G { float4 _260 = SSProfilesTexture.read(uint2(int3(1, int(uint((select(float4(0.0), SceneTexturesStruct_GBufferDTexture.sample(SceneTexturesStruct_GBufferDTextureSampler, _114, level(0.0)), bool4(!(((_240 & 4294967280u) & 16u) != 0u))).x * 255.0) + 0.5)), 0).xy), 0); float _263 = _260.y * 0.5; + float3 _266 = _148 - (_236 * float3(_263)); float _274 = pow(fast::clamp(dot(-(_152 * float3(rsqrt(dot(_152, _152)))), _236), 0.0, 1.0), 1.0); float _445; if (_160) @@ -286,7 +287,7 @@ fragment main0_out main0(constant type_View& View [[buffer(0)]], constant type_G } _311 = _307; } - float4 _318 = _Globals.ShadowViewProjectionMatrices[_311] * float4(_148 - (_236 * float3(_263)), 1.0); + float4 _318 = _Globals.ShadowViewProjectionMatrices[_311] * float4(_266, 1.0); float _323 = _260.x * (10.0 / _Globals.LightPositionAndInvRadius.w); float _329 = (1.0 / (((_318.z / _318.w) * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w; float _342 = (_329 - ((1.0 / ((float4(ShadowDepthCubeTexture.sample(ShadowDepthTextureSampler, (_278 + (_286 * float3(2.5))), level(0.0))).x * _Globals.PointLightDepthBiasAndProjParameters.z) - _Globals.PointLightDepthBiasAndProjParameters.w)) * _Globals.LightPositionAndInvRadius.w)) * _323; -- cgit v1.2.3