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
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')
-rw-r--r--reference/opt/shaders-ue4/asm/frag/depth-compare.asm.frag3
-rw-r--r--reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag8
-rw-r--r--reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag29
-rw-r--r--reference/opt/shaders-ue4/asm/vert/array-missing-copies.asm.vert3
-rw-r--r--reference/opt/shaders-ue4/asm/vert/texture-buffer.asm.vert3
-rw-r--r--reference/shaders-no-opt/asm/comp/expression-nesting-limits.asm.comp34
-rw-r--r--reference/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag5
-rw-r--r--reference/shaders-ue4/asm/frag/depth-compare.asm.frag3
-rw-r--r--reference/shaders-ue4/asm/frag/global-constant-arrays.asm.frag8
-rw-r--r--reference/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag29
-rw-r--r--reference/shaders-ue4/asm/vert/array-missing-copies.asm.vert3
-rw-r--r--reference/shaders-ue4/asm/vert/texture-buffer.asm.vert3
12 files changed, 78 insertions, 53 deletions
diff --git a/reference/opt/shaders-ue4/asm/frag/depth-compare.asm.frag b/reference/opt/shaders-ue4/asm/frag/depth-compare.asm.frag
index b54a05fe..d18b674f 100644
--- a/reference/opt/shaders-ue4/asm/frag/depth-compare.asm.frag
+++ b/reference/opt/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;
diff --git a/reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag b/reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag
index 03fa7c53..70100279 100644
--- a/reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag
+++ b/reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag
@@ -181,15 +181,13 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globa
float _669 = _644 + ((_660.x * _Globals.WhiteTint) * 0.0500000007450580596923828125);
float _674 = ((2.0 * _665) - (8.0 * _669)) + 4.0;
float2 _680 = select(float2(_616, (_616 * (((-3.0) * _616) + 2.86999988555908203125)) - 0.2750000059604644775390625), _653, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _665) / _674, (2.0 * _669) / _674) - _653);
- float _681 = _680.x;
- float _682 = _680.y;
- float _683 = fast::max(_682, 1.0000000133514319600180897396058e-10);
+ float _683 = fast::max(_680.y, 1.0000000133514319600180897396058e-10);
float3 _685 = _391;
- _685.x = _681 / _683;
+ _685.x = _680.x / _683;
float3 _686 = _685;
_686.y = 1.0;
float3 _690 = _686;
- _690.z = ((1.0 - _681) - _682) / _683;
+ _690.z = ((1.0 - _680.x) - _680.y) / _683;
float3 _693 = _391;
_693.x = 0.950455963611602783203125;
float3 _694 = _693;
diff --git a/reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag b/reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag
index f1c43630..f7e65ae7 100644
--- a/reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag
+++ b/reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag
@@ -183,15 +183,13 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globa
float _695 = _670 + ((_686.x * _Globals.WhiteTint) * 0.0500000007450580596923828125);
float _700 = ((2.0 * _691) - (8.0 * _695)) + 4.0;
float2 _706 = select(float2(_642, (_642 * (((-3.0) * _642) + 2.86999988555908203125)) - 0.2750000059604644775390625), _679, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _691) / _700, (2.0 * _695) / _700) - _679);
- float _707 = _706.x;
- float _708 = _706.y;
- float _709 = fast::max(_708, 1.0000000133514319600180897396058e-10);
+ float _709 = fast::max(_706.y, 1.0000000133514319600180897396058e-10);
float3 _711 = _523;
- _711.x = _707 / _709;
+ _711.x = _706.x / _709;
float3 _712 = _711;
_712.y = 1.0;
float3 _716 = _712;
- _716.z = ((1.0 - _707) - _708) / _709;
+ _716.z = ((1.0 - _706.x) - _706.y) / _709;
float3 _719 = _523;
_719.x = 0.950455963611602783203125;
float3 _720 = _719;
@@ -392,40 +390,37 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globa
float3 _3103;
if (_Globals.OutputDevice == 0u)
{
- float _3063 = _1324.x;
float _3075;
for (;;)
{
- if (_3063 < 0.00313066993840038776397705078125)
+ if (_1324.x < 0.00313066993840038776397705078125)
{
- _3075 = _3063 * 12.9200000762939453125;
+ _3075 = _1324.x * 12.9200000762939453125;
break;
}
- _3075 = (pow(_3063, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
+ _3075 = (pow(_1324.x, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
break;
}
- float _3076 = _1324.y;
float _3088;
for (;;)
{
- if (_3076 < 0.00313066993840038776397705078125)
+ if (_1324.y < 0.00313066993840038776397705078125)
{
- _3088 = _3076 * 12.9200000762939453125;
+ _3088 = _1324.y * 12.9200000762939453125;
break;
}
- _3088 = (pow(_3076, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
+ _3088 = (pow(_1324.y, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
break;
}
- float _3089 = _1324.z;
float _3101;
for (;;)
{
- if (_3089 < 0.00313066993840038776397705078125)
+ if (_1324.z < 0.00313066993840038776397705078125)
{
- _3101 = _3089 * 12.9200000762939453125;
+ _3101 = _1324.z * 12.9200000762939453125;
break;
}
- _3101 = (pow(_3089, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
+ _3101 = (pow(_1324.z, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
break;
}
_3103 = float3(_3075, _3088, _3101);
diff --git a/reference/opt/shaders-ue4/asm/vert/array-missing-copies.asm.vert b/reference/opt/shaders-ue4/asm/vert/array-missing-copies.asm.vert
index 520b58e7..e40239db 100644
--- a/reference/opt/shaders-ue4/asm/vert/array-missing-copies.asm.vert
+++ b/reference/opt/shaders-ue4/asm/vert/array-missing-copies.asm.vert
@@ -443,7 +443,8 @@ vertex main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buff
}
bool _468 = (MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.w > 0.0) && (_347 > MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.w);
float _471 = _468 ? 1.0 : fast::max(fast::clamp(exp2(-(_428 * _393)), 0.0, 1.0), MobileBasePass.MobileBasePass_Fog_ExponentialFogColorParameter.w);
- float4 _479 = float4((MobileBasePass.MobileBasePass_Fog_ExponentialFogColorParameter.xyz * float3(1.0 - _471)) + select(_459, float3(0.0), bool3(_468)), _471);
+ float3 _475 = (MobileBasePass.MobileBasePass_Fog_ExponentialFogColorParameter.xyz * float3(1.0 - _471)) + select(_459, float3(0.0), bool3(_468));
+ float4 _479 = float4(_475, _471);
float4 _482 = _338;
_482.w = _339.w;
out.out_var_TEXCOORD0 = ((_323 + LandscapeParameters.LandscapeParameters_SubsectionSizeVertsLayerUVPan.zw) + _292).xy;
diff --git a/reference/opt/shaders-ue4/asm/vert/texture-buffer.asm.vert b/reference/opt/shaders-ue4/asm/vert/texture-buffer.asm.vert
index 7938ecfc..ea7db420 100644
--- a/reference/opt/shaders-ue4/asm/vert/texture-buffer.asm.vert
+++ b/reference/opt/shaders-ue4/asm/vert/texture-buffer.asm.vert
@@ -363,7 +363,8 @@ vertex main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buff
float _339 = ((_145.z + ((_145.w * EmitterUniforms.EmitterUniforms_RotationRateScale) * _146)) * 6.283185482025146484375) + EmitterUniforms.EmitterUniforms_RotationBias;
float3 _342 = float3(sin(_339));
float3 _344 = float3(cos(_339));
- float4 _371 = float4(_239 + ((float3(_204.x * (in.in_var_ATTRIBUTE0.x + EmitterUniforms.EmitterUniforms_PivotOffset.x)) * ((_342 * _336) + (_344 * _335))) + (float3(_204.y * (in.in_var_ATTRIBUTE0.y + EmitterUniforms.EmitterUniforms_PivotOffset.y)) * ((_344 * _336) - (_342 * _335)))), 1.0);
+ float3 _367 = _239 + ((float3(_204.x * (in.in_var_ATTRIBUTE0.x + EmitterUniforms.EmitterUniforms_PivotOffset.x)) * ((_342 * _336) + (_344 * _335))) + (float3(_204.y * (in.in_var_ATTRIBUTE0.y + EmitterUniforms.EmitterUniforms_PivotOffset.y)) * ((_344 * _336) - (_342 * _335))));
+ float4 _371 = float4(_367, 1.0);
float4 _375 = MobileShadowDepthPass.MobileShadowDepthPass_ProjectionMatrix * float4(_371.x, _371.y, _371.z, _371.w);
float4 _386;
if ((MobileShadowDepthPass.MobileShadowDepthPass_bClampToNearPlane > 0.0) && (_375.z < 0.0))
diff --git a/reference/shaders-no-opt/asm/comp/expression-nesting-limits.asm.comp b/reference/shaders-no-opt/asm/comp/expression-nesting-limits.asm.comp
new file mode 100644
index 00000000..83a9b83f
--- /dev/null
+++ b/reference/shaders-no-opt/asm/comp/expression-nesting-limits.asm.comp
@@ -0,0 +1,34 @@
+#version 430
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+
+layout(binding = 0, std430) buffer _4_5
+{
+ uint _m0[16];
+} _5;
+
+layout(binding = 1, std430) buffer _4_6
+{
+ uint _m0[16];
+} _6;
+
+layout(binding = 2, std430) buffer _4_7
+{
+ uint _m0[16];
+} _7;
+
+vec4 _88(vec4 _89)
+{
+ for (int _91 = 0; _91 < 16; _91++)
+ {
+ uint _163 = _6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + _5._m0[_91]))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
+ uint _225 = _6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + _163)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
+ _7._m0[_91] = _6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + _225))))))))))))));
+ }
+ return _89;
+}
+
+void main()
+{
+ vec4 _87 = _88(vec4(uvec4(gl_GlobalInvocationID, 0u)));
+}
+
diff --git a/reference/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag b/reference/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag
index 4049c482..ff9c122f 100644
--- a/reference/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag
+++ b/reference/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag
@@ -216,10 +216,9 @@ void main()
vec2 _376 = texture(SPIRV_Cross_CombinedShadowMapTextureShadowMapSampler, IN_PosLightSpace_Reflectance.xyz.xy).xy;
float _392 = (1.0 - (((step(_376.x, IN_PosLightSpace_Reflectance.xyz.z) * clamp(9.0 - (20.0 * abs(IN_PosLightSpace_Reflectance.xyz.z - 0.5)), 0.0, 1.0)) * _376.y) * _19.CB0.OutlineBrightness_ShadowInfo.w)) * _368.w;
vec3 _403 = mix(_318.xyz, texture(SPIRV_Cross_CombinedEnvironmentMapTextureEnvironmentMapSampler, reflect(-IN_View_Depth.xyz, _329)).xyz, vec3(_312));
- vec4 _404 = vec4(_403.x, _403.y, _403.z, _318.w);
- vec3 _422 = (((_19.CB0.AmbientColor + (((_19.CB0.Lamp0Color * clamp(_333, 0.0, 1.0)) + (_19.CB0.Lamp1Color * max(-_333, 0.0))) * _392)) + _368.xyz) * _404.xyz) + (_19.CB0.Lamp0Color * (((step(0.0, _333) * _306) * _392) * pow(clamp(dot(_329, normalize(_332 + normalize(IN_View_Depth.xyz))), 0.0, 1.0), _308)));
+ vec3 _422 = (((_19.CB0.AmbientColor + (((_19.CB0.Lamp0Color * clamp(_333, 0.0, 1.0)) + (_19.CB0.Lamp1Color * max(-_333, 0.0))) * _392)) + _368.xyz) * vec4(_403.x, _403.y, _403.z, _318.w).xyz) + (_19.CB0.Lamp0Color * (((step(0.0, _333) * _306) * _392) * pow(clamp(dot(_329, normalize(_332 + normalize(IN_View_Depth.xyz))), 0.0, 1.0), _308)));
vec4 _425 = vec4(_422.x, _422.y, _422.z, _124.w);
- _425.w = _404.w;
+ _425.w = vec4(_403.x, _403.y, _403.z, _318.w).w;
vec2 _435 = min(IN_Uv_EdgeDistance1.wz, IN_UvStuds_EdgeDistance2.wz);
float _439 = min(_435.x, _435.y) / _163;
vec3 _445 = _425.xyz * clamp((clamp((_163 * _19.CB0.OutlineBrightness_ShadowInfo.x) + _19.CB0.OutlineBrightness_ShadowInfo.y, 0.0, 1.0) * (1.5 - _439)) + _439, 0.0, 1.0);
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;
diff --git a/reference/shaders-ue4/asm/frag/global-constant-arrays.asm.frag b/reference/shaders-ue4/asm/frag/global-constant-arrays.asm.frag
index c3d26e65..f189d1d2 100644
--- a/reference/shaders-ue4/asm/frag/global-constant-arrays.asm.frag
+++ b/reference/shaders-ue4/asm/frag/global-constant-arrays.asm.frag
@@ -181,15 +181,13 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globa
float _669 = _644 + ((_660.x * _Globals.WhiteTint) * 0.0500000007450580596923828125);
float _674 = ((2.0 * _665) - (8.0 * _669)) + 4.0;
float2 _680 = select(float2(_616, ((((-3.0) * _616) * _616) + (2.86999988555908203125 * _616)) - 0.2750000059604644775390625), _653, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _665) / _674, (2.0 * _669) / _674) - _653);
- float _681 = _680.x;
- float _682 = _680.y;
- float _683 = fast::max(_682, 1.0000000133514319600180897396058e-10);
+ float _683 = fast::max(_680.y, 1.0000000133514319600180897396058e-10);
float3 _685 = _391;
- _685.x = _681 / _683;
+ _685.x = _680.x / _683;
float3 _686 = _685;
_686.y = 1.0;
float3 _690 = _686;
- _690.z = ((1.0 - _681) - _682) / _683;
+ _690.z = ((1.0 - _680.x) - _680.y) / _683;
float _691 = fast::max(0.328999996185302734375, 1.0000000133514319600180897396058e-10);
float3 _693 = _391;
_693.x = 0.3127000033855438232421875 / _691;
diff --git a/reference/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag b/reference/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag
index 83857f22..e3d3f546 100644
--- a/reference/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag
+++ b/reference/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag
@@ -183,15 +183,13 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globa
float _695 = _670 + ((_686.x * _Globals.WhiteTint) * 0.0500000007450580596923828125);
float _700 = ((2.0 * _691) - (8.0 * _695)) + 4.0;
float2 _706 = select(float2(_642, ((((-3.0) * _642) * _642) + (2.86999988555908203125 * _642)) - 0.2750000059604644775390625), _679, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _691) / _700, (2.0 * _695) / _700) - _679);
- float _707 = _706.x;
- float _708 = _706.y;
- float _709 = fast::max(_708, 1.0000000133514319600180897396058e-10);
+ float _709 = fast::max(_706.y, 1.0000000133514319600180897396058e-10);
float3 _711 = _523;
- _711.x = _707 / _709;
+ _711.x = _706.x / _709;
float3 _712 = _711;
_712.y = 1.0;
float3 _716 = _712;
- _716.z = ((1.0 - _707) - _708) / _709;
+ _716.z = ((1.0 - _706.x) - _706.y) / _709;
float _717 = fast::max(0.328999996185302734375, 1.0000000133514319600180897396058e-10);
float3 _719 = _523;
_719.x = 0.3127000033855438232421875 / _717;
@@ -394,40 +392,37 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globa
float3 _3103;
if (_Globals.OutputDevice == 0u)
{
- float _3063 = _1324.x;
float _3075;
for (;;)
{
- if (_3063 < 0.00313066993840038776397705078125)
+ if (_1324.x < 0.00313066993840038776397705078125)
{
- _3075 = _3063 * 12.9200000762939453125;
+ _3075 = _1324.x * 12.9200000762939453125;
break;
}
- _3075 = (pow(_3063, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
+ _3075 = (pow(_1324.x, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
break;
}
- float _3076 = _1324.y;
float _3088;
for (;;)
{
- if (_3076 < 0.00313066993840038776397705078125)
+ if (_1324.y < 0.00313066993840038776397705078125)
{
- _3088 = _3076 * 12.9200000762939453125;
+ _3088 = _1324.y * 12.9200000762939453125;
break;
}
- _3088 = (pow(_3076, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
+ _3088 = (pow(_1324.y, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
break;
}
- float _3089 = _1324.z;
float _3101;
for (;;)
{
- if (_3089 < 0.00313066993840038776397705078125)
+ if (_1324.z < 0.00313066993840038776397705078125)
{
- _3101 = _3089 * 12.9200000762939453125;
+ _3101 = _1324.z * 12.9200000762939453125;
break;
}
- _3101 = (pow(_3089, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
+ _3101 = (pow(_1324.z, 0.4166666567325592041015625) * 1.05499994754791259765625) - 0.054999999701976776123046875;
break;
}
_3103 = float3(_3075, _3088, _3101);
diff --git a/reference/shaders-ue4/asm/vert/array-missing-copies.asm.vert b/reference/shaders-ue4/asm/vert/array-missing-copies.asm.vert
index 3d3e0e51..67097c57 100644
--- a/reference/shaders-ue4/asm/vert/array-missing-copies.asm.vert
+++ b/reference/shaders-ue4/asm/vert/array-missing-copies.asm.vert
@@ -452,7 +452,8 @@ vertex main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buff
}
bool _468 = (MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.w > 0.0) && (_347 > MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters3.w);
float _471 = _468 ? 1.0 : fast::max(fast::clamp(exp2(-(_428 * _393)), 0.0, 1.0), MobileBasePass.MobileBasePass_Fog_ExponentialFogColorParameter.w);
- _97[0] = float4((MobileBasePass.MobileBasePass_Fog_ExponentialFogColorParameter.xyz * float3(1.0 - _471)) + select(_459, float3(0.0), bool3(_468)), _471);
+ float3 _475 = (MobileBasePass.MobileBasePass_Fog_ExponentialFogColorParameter.xyz * float3(1.0 - _471)) + select(_459, float3(0.0), bool3(_468));
+ _97[0] = float4(_475, _471);
float4 _482 = _338;
_482.w = _339.w;
out.out_var_TEXCOORD0 = ((_323 + LandscapeParameters.LandscapeParameters_SubsectionSizeVertsLayerUVPan.zw) + _292).xy;
diff --git a/reference/shaders-ue4/asm/vert/texture-buffer.asm.vert b/reference/shaders-ue4/asm/vert/texture-buffer.asm.vert
index 7938ecfc..ea7db420 100644
--- a/reference/shaders-ue4/asm/vert/texture-buffer.asm.vert
+++ b/reference/shaders-ue4/asm/vert/texture-buffer.asm.vert
@@ -363,7 +363,8 @@ vertex main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buff
float _339 = ((_145.z + ((_145.w * EmitterUniforms.EmitterUniforms_RotationRateScale) * _146)) * 6.283185482025146484375) + EmitterUniforms.EmitterUniforms_RotationBias;
float3 _342 = float3(sin(_339));
float3 _344 = float3(cos(_339));
- float4 _371 = float4(_239 + ((float3(_204.x * (in.in_var_ATTRIBUTE0.x + EmitterUniforms.EmitterUniforms_PivotOffset.x)) * ((_342 * _336) + (_344 * _335))) + (float3(_204.y * (in.in_var_ATTRIBUTE0.y + EmitterUniforms.EmitterUniforms_PivotOffset.y)) * ((_344 * _336) - (_342 * _335)))), 1.0);
+ float3 _367 = _239 + ((float3(_204.x * (in.in_var_ATTRIBUTE0.x + EmitterUniforms.EmitterUniforms_PivotOffset.x)) * ((_342 * _336) + (_344 * _335))) + (float3(_204.y * (in.in_var_ATTRIBUTE0.y + EmitterUniforms.EmitterUniforms_PivotOffset.y)) * ((_344 * _336) - (_342 * _335))));
+ float4 _371 = float4(_367, 1.0);
float4 _375 = MobileShadowDepthPass.MobileShadowDepthPass_ProjectionMatrix * float4(_371.x, _371.y, _371.z, _371.w);
float4 _386;
if ((MobileShadowDepthPass.MobileShadowDepthPass_bClampToNearPlane > 0.0) && (_375.z < 0.0))