Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2022-01-17 14:49:02 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2022-01-17 15:45:12 +0300
commitef6bde658021dae7732d9b628d58b2e0905c938c (patch)
treea355bdba0a17af8bf2eb85236d05c90fa72bbbf2 /reference/shaders-ue4/asm/frag/depth-compare.asm.frag
parenta1bb29ccbb285618028a24efb3fe4f6718cee0b5 (diff)
Do not forward expressions which carry a huge amount of dependencies.
Need to force temporaries eventually, or compilers have a tendency to explode.
Diffstat (limited to 'reference/shaders-ue4/asm/frag/depth-compare.asm.frag')
-rw-r--r--reference/shaders-ue4/asm/frag/depth-compare.asm.frag3
1 files changed, 2 insertions, 1 deletions
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;