Fix CFG::update_common_dominator.

The algorithm was too conservative causing lots of unnecessary
temporaries to be created.
This commit is contained in:
Hans-Kristian Arntzen 2018-01-24 19:46:53 +01:00
parent 09f550f718
commit b3f6e3de8e
20 changed files with 163 additions and 363 deletions

View File

@ -104,7 +104,6 @@ struct main0_out
fragment main0_out main0(main0_in in [[stage_in]], float4 gl_FragCoord [[position]], constant CB0& _19 [[buffer(0)]], texture3d<float> LightMapTexture [[texture(0)]], sampler LightMapSampler [[sampler(0)]], sampler ShadowMapSampler [[sampler(1)]], texture2d<float> ShadowMapTexture [[texture(1)]], texturecube<float> EnvironmentMapTexture [[texture(2)]], sampler EnvironmentMapSampler [[sampler(2)]], sampler DiffuseMapSampler [[sampler(3)]], texture2d<float> DiffuseMapTexture [[texture(3)]], sampler NormalMapSampler [[sampler(4)]], texture2d<float> NormalMapTexture [[texture(4)]], texture2d<float> NormalDetailMapTexture [[texture(5)]], sampler NormalDetailMapSampler [[sampler(5)]], texture2d<float> StudsMapTexture [[texture(6)]], sampler StudsMapSampler [[sampler(6)]], sampler SpecularMapSampler [[sampler(7)]], texture2d<float> SpecularMapTexture [[texture(7)]])
{
main0_out out = {};
bool _173;
VertexOutput _128 = _121;
_128.HPosition = gl_FragCoord;
VertexOutput _130 = _128;
@ -136,6 +135,7 @@ fragment main0_out main0(main0_in in [[stage_in]], float4 gl_FragCoord [[positio
float _163 = _146.View_Depth.w * _19.CB0.RefractionBias_FadeDistance_GlowFactor.y;
float _165 = clamp(1.0 - _163, 0.0, 1.0);
float2 _166 = in.IN_Uv_EdgeDistance1.xy * 1.0;
bool _173;
float4 _193;
do
{

View File

@ -15,8 +15,8 @@ fragment main0_out main0()
{
main0_out out = {};
float4 _51;
float4 _52;
_51 = _50;
float4 _52;
for (;;)
{
if (0.0 != 0.0)

View File

@ -98,42 +98,6 @@ struct main0_out
fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buffer(0)]], texture2d<float> _8 [[texture(0)]], sampler _9 [[sampler(0)]], constant _10& _11 [[buffer(1)]], texture2d<float> _12 [[texture(1)]], sampler _13 [[sampler(1)]], texture2d<float> _14 [[texture(2)]], sampler _15 [[sampler(2)]], constant _18& _19 [[buffer(2)]])
{
main0_out out = {};
_28 _652;
float4 _651;
float _648;
_28 _605;
float4 _604;
float _601;
_28 _558;
float4 _557;
float _554;
_28 _511;
float4 _510;
float _507;
_28 _464;
float4 _463;
float _460;
_28 _229;
float4 _228;
float _225;
_28 _182;
float4 _181;
float _178;
float _413;
_28 _417;
float _131;
float4 _134;
_28 _135;
float _272;
float4 _275;
_28 _276;
float _319;
float4 _322;
_28 _323;
float _366;
float4 _369;
_28 _370;
float4 _416;
_28 _77 = _74;
_77._m0 = float4(0.0);
float2 _82 = gl_FragCoord.xy * _19._m23.xy;
@ -142,18 +106,6 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
float3 _109 = _11._m5 * clamp(_8.sample(_9, _97, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _113 = _12.sample(_13, _97, level(0.0));
float3 _129;
float3 _176;
float3 _223;
float3 _270;
float3 _317;
float3 _364;
float3 _411;
float3 _458;
float3 _505;
float3 _552;
float3 _599;
float3 _646;
float3 _693;
if (_113.y > 0.0)
{
_129 = _109 + (_14.sample(_15, _97, level(0.0)).xyz * clamp(_113.y * _113.z, 0.0, 1.0));
@ -162,14 +114,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_129 = _109;
}
_131 = 0.0 + 0.5;
float3 _133 = float4(0.0).xyz + (_129 * 0.5);
_134 = float4(_133.x, _133.y, _133.z, float4(0.0).w);
_135 = _77;
float4 _134 = float4(_133.x, _133.y, _133.z, float4(0.0).w);
_28 _135 = _77;
_135._m0 = _134;
float2 _144 = clamp(_82 + (float3(-1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _156 = _11._m5 * clamp(_8.sample(_9, _144, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _160 = _12.sample(_13, _144, level(0.0));
float3 _176;
if (_160.y > 0.0)
{
_176 = _156 + (_14.sample(_15, _144, level(0.0)).xyz * clamp(_160.y * _160.z, 0.0, 1.0));
@ -178,14 +130,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_176 = _156;
}
_178 = _131 + 0.5;
float3 _180 = _134.xyz + (_176 * 0.5);
_181 = float4(_180.x, _180.y, _180.z, _134.w);
_182 = _135;
float4 _181 = float4(_180.x, _180.y, _180.z, _134.w);
_28 _182 = _135;
_182._m0 = _181;
float2 _191 = clamp(_82 + (float3(0.0, -1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _203 = _11._m5 * clamp(_8.sample(_9, _191, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _207 = _12.sample(_13, _191, level(0.0));
float3 _223;
if (_207.y > 0.0)
{
_223 = _203 + (_14.sample(_15, _191, level(0.0)).xyz * clamp(_207.y * _207.z, 0.0, 1.0));
@ -194,14 +146,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_223 = _203;
}
_225 = _178 + 0.75;
float3 _227 = _181.xyz + (_223 * 0.75);
_228 = float4(_227.x, _227.y, _227.z, _181.w);
_229 = _182;
float4 _228 = float4(_227.x, _227.y, _227.z, _181.w);
_28 _229 = _182;
_229._m0 = _228;
float2 _238 = clamp(_82 + (float3(1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _250 = _11._m5 * clamp(_8.sample(_9, _238, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _254 = _12.sample(_13, _238, level(0.0));
float3 _270;
if (_254.y > 0.0)
{
_270 = _250 + (_14.sample(_15, _238, level(0.0)).xyz * clamp(_254.y * _254.z, 0.0, 1.0));
@ -210,14 +162,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_270 = _250;
}
_272 = _225 + 0.5;
float3 _274 = _228.xyz + (_270 * 0.5);
_275 = float4(_274.x, _274.y, _274.z, _228.w);
_276 = _229;
float4 _275 = float4(_274.x, _274.y, _274.z, _228.w);
_28 _276 = _229;
_276._m0 = _275;
float2 _285 = clamp(_82 + (float3(-2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _297 = _11._m5 * clamp(_8.sample(_9, _285, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _301 = _12.sample(_13, _285, level(0.0));
float3 _317;
if (_301.y > 0.0)
{
_317 = _297 + (_14.sample(_15, _285, level(0.0)).xyz * clamp(_301.y * _301.z, 0.0, 1.0));
@ -226,14 +178,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_317 = _297;
}
_319 = _272 + 0.5;
float3 _321 = _275.xyz + (_317 * 0.5);
_322 = float4(_321.x, _321.y, _321.z, _275.w);
_323 = _276;
float4 _322 = float4(_321.x, _321.y, _321.z, _275.w);
_28 _323 = _276;
_323._m0 = _322;
float2 _332 = clamp(_82 + (float3(-1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _344 = _11._m5 * clamp(_8.sample(_9, _332, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _348 = _12.sample(_13, _332, level(0.0));
float3 _364;
if (_348.y > 0.0)
{
_364 = _344 + (_14.sample(_15, _332, level(0.0)).xyz * clamp(_348.y * _348.z, 0.0, 1.0));
@ -242,14 +194,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_364 = _344;
}
_366 = _319 + 0.75;
float3 _368 = _322.xyz + (_364 * 0.75);
_369 = float4(_368.x, _368.y, _368.z, _322.w);
_370 = _323;
float4 _369 = float4(_368.x, _368.y, _368.z, _322.w);
_28 _370 = _323;
_370._m0 = _369;
float2 _379 = clamp(_82 + (float3(0.0, 0.0, 1.0).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _391 = _11._m5 * clamp(_8.sample(_9, _379, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _395 = _12.sample(_13, _379, level(0.0));
float3 _411;
if (_395.y > 0.0)
{
_411 = _391 + (_14.sample(_15, _379, level(0.0)).xyz * clamp(_395.y * _395.z, 0.0, 1.0));
@ -258,14 +210,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_411 = _391;
}
_413 = _366 + 1.0;
float3 _415 = _369.xyz + (_411 * 1.0);
_416 = float4(_415.x, _415.y, _415.z, _369.w);
_417 = _370;
float4 _416 = float4(_415.x, _415.y, _415.z, _369.w);
_28 _417 = _370;
_417._m0 = _416;
float2 _426 = clamp(_82 + (float3(1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _438 = _11._m5 * clamp(_8.sample(_9, _426, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _442 = _12.sample(_13, _426, level(0.0));
float3 _458;
if (_442.y > 0.0)
{
_458 = _438 + (_14.sample(_15, _426, level(0.0)).xyz * clamp(_442.y * _442.z, 0.0, 1.0));
@ -274,14 +226,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_458 = _438;
}
_460 = _413 + 0.75;
float3 _462 = _416.xyz + (_458 * 0.75);
_463 = float4(_462.x, _462.y, _462.z, _416.w);
_464 = _417;
float4 _463 = float4(_462.x, _462.y, _462.z, _416.w);
_28 _464 = _417;
_464._m0 = _463;
float2 _473 = clamp(_82 + (float3(2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _485 = _11._m5 * clamp(_8.sample(_9, _473, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _489 = _12.sample(_13, _473, level(0.0));
float3 _505;
if (_489.y > 0.0)
{
_505 = _485 + (_14.sample(_15, _473, level(0.0)).xyz * clamp(_489.y * _489.z, 0.0, 1.0));
@ -290,14 +242,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_505 = _485;
}
_507 = _460 + 0.5;
float3 _509 = _463.xyz + (_505 * 0.5);
_510 = float4(_509.x, _509.y, _509.z, _463.w);
_511 = _464;
float4 _510 = float4(_509.x, _509.y, _509.z, _463.w);
_28 _511 = _464;
_511._m0 = _510;
float2 _520 = clamp(_82 + (float3(-1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _532 = _11._m5 * clamp(_8.sample(_9, _520, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _536 = _12.sample(_13, _520, level(0.0));
float3 _552;
if (_536.y > 0.0)
{
_552 = _532 + (_14.sample(_15, _520, level(0.0)).xyz * clamp(_536.y * _536.z, 0.0, 1.0));
@ -306,14 +258,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_552 = _532;
}
_554 = _507 + 0.5;
float3 _556 = _510.xyz + (_552 * 0.5);
_557 = float4(_556.x, _556.y, _556.z, _510.w);
_558 = _511;
float4 _557 = float4(_556.x, _556.y, _556.z, _510.w);
_28 _558 = _511;
_558._m0 = _557;
float2 _567 = clamp(_82 + (float3(0.0, 1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _579 = _11._m5 * clamp(_8.sample(_9, _567, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _583 = _12.sample(_13, _567, level(0.0));
float3 _599;
if (_583.y > 0.0)
{
_599 = _579 + (_14.sample(_15, _567, level(0.0)).xyz * clamp(_583.y * _583.z, 0.0, 1.0));
@ -322,14 +274,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_599 = _579;
}
_601 = _554 + 0.75;
float3 _603 = _557.xyz + (_599 * 0.75);
_604 = float4(_603.x, _603.y, _603.z, _557.w);
_605 = _558;
float4 _604 = float4(_603.x, _603.y, _603.z, _557.w);
_28 _605 = _558;
_605._m0 = _604;
float2 _614 = clamp(_82 + (float3(1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _626 = _11._m5 * clamp(_8.sample(_9, _614, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _630 = _12.sample(_13, _614, level(0.0));
float3 _646;
if (_630.y > 0.0)
{
_646 = _626 + (_14.sample(_15, _614, level(0.0)).xyz * clamp(_630.y * _630.z, 0.0, 1.0));
@ -338,14 +290,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_646 = _626;
}
_648 = _601 + 0.5;
float3 _650 = _604.xyz + (_646 * 0.5);
_651 = float4(_650.x, _650.y, _650.z, _604.w);
_652 = _605;
float4 _651 = float4(_650.x, _650.y, _650.z, _604.w);
_28 _652 = _605;
_652._m0 = _651;
float2 _661 = clamp(_82 + (float3(0.0, 2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _673 = _11._m5 * clamp(_8.sample(_9, _661, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _677 = _12.sample(_13, _661, level(0.0));
float3 _693;
if (_677.y > 0.0)
{
_693 = _673 + (_14.sample(_15, _661, level(0.0)).xyz * clamp(_677.y * _677.z, 0.0, 1.0));
@ -358,7 +310,7 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
float4 _698 = float4(_697.x, _697.y, _697.z, _651.w);
_28 _699 = _652;
_699._m0 = _698;
float3 _702 = _698.xyz / float3(_648 + 0.5);
float3 _702 = _698.xyz / float3(((((((((((((0.0 + 0.5) + 0.5) + 0.75) + 0.5) + 0.5) + 0.75) + 1.0) + 0.75) + 0.5) + 0.5) + 0.75) + 0.5) + 0.5);
_28 _704 = _699;
_704._m0 = float4(_702.x, _702.y, _702.z, _698.w);
_28 _705 = _704;

View File

@ -16,10 +16,10 @@ struct SSBO2
kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device SSBO& _28 [[buffer(0)]], device SSBO2& _52 [[buffer(1)]])
{
float4 _42;
int i = 0;
float4 _56;
_56 = _28.in_data[gl_GlobalInvocationID.x];
float4 _42;
for (;;)
{
_42 = _28.mvp * _56;

View File

@ -18,12 +18,12 @@ constant uint _98 = {};
kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device SSBO& _24 [[buffer(0)]], device SSBO2& _89 [[buffer(1)]])
{
int _40;
float4 _93;
int _94;
_93 = _24.in_data[gl_GlobalInvocationID.x];
_94 = 0;
int _48;
int _40;
float4 _46;
for (;;)
{

View File

@ -97,7 +97,6 @@ vec4 _297;
void main()
{
bool _173;
VertexOutput _128 = _121;
_128.HPosition = gl_FragCoord;
VertexOutput _130 = _128;
@ -129,6 +128,7 @@ void main()
float _163 = _146.View_Depth.w * _19.CB0.RefractionBias_FadeDistance_GlowFactor.y;
float _165 = clamp(1.0 - _163, 0.0, 1.0);
vec2 _166 = IN_Uv_EdgeDistance1.xy * 1.0;
bool _173;
vec4 _193;
do
{

View File

@ -8,8 +8,8 @@ vec4 _50;
void main()
{
vec4 _51;
vec4 _52;
_51 = _50;
vec4 _52;
for (;;)
{
if (0.0 != 0.0)

View File

@ -94,42 +94,6 @@ _28 _74;
void main()
{
_28 _652;
vec4 _651;
float _648;
_28 _605;
vec4 _604;
float _601;
_28 _558;
vec4 _557;
float _554;
_28 _511;
vec4 _510;
float _507;
_28 _464;
vec4 _463;
float _460;
_28 _229;
vec4 _228;
float _225;
_28 _182;
vec4 _181;
float _178;
float _413;
_28 _417;
float _131;
vec4 _134;
_28 _135;
float _272;
vec4 _275;
_28 _276;
float _319;
vec4 _322;
_28 _323;
float _366;
vec4 _369;
_28 _370;
vec4 _416;
_28 _77 = _74;
_77._m0 = vec4(0.0);
vec2 _82 = gl_FragCoord.xy * _19._m23.xy;
@ -138,18 +102,6 @@ void main()
vec3 _109 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _97, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _113 = textureLod(SPIRV_Cross_Combined_1, _97, 0.0);
vec3 _129;
vec3 _176;
vec3 _223;
vec3 _270;
vec3 _317;
vec3 _364;
vec3 _411;
vec3 _458;
vec3 _505;
vec3 _552;
vec3 _599;
vec3 _646;
vec3 _693;
if (_113.y > 0.0)
{
_129 = _109 + (textureLod(SPIRV_Cross_Combined_2, _97, 0.0).xyz * clamp(_113.y * _113.z, 0.0, 1.0));
@ -158,14 +110,14 @@ void main()
{
_129 = _109;
}
_131 = 0.0 + 0.5;
vec3 _133 = vec4(0.0).xyz + (_129 * 0.5);
_134 = vec4(_133.x, _133.y, _133.z, vec4(0.0).w);
_135 = _77;
vec4 _134 = vec4(_133.x, _133.y, _133.z, vec4(0.0).w);
_28 _135 = _77;
_135._m0 = _134;
vec2 _144 = clamp(_82 + (vec3(-1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _156 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _144, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _160 = textureLod(SPIRV_Cross_Combined_1, _144, 0.0);
vec3 _176;
if (_160.y > 0.0)
{
_176 = _156 + (textureLod(SPIRV_Cross_Combined_2, _144, 0.0).xyz * clamp(_160.y * _160.z, 0.0, 1.0));
@ -174,14 +126,14 @@ void main()
{
_176 = _156;
}
_178 = _131 + 0.5;
vec3 _180 = _134.xyz + (_176 * 0.5);
_181 = vec4(_180.x, _180.y, _180.z, _134.w);
_182 = _135;
vec4 _181 = vec4(_180.x, _180.y, _180.z, _134.w);
_28 _182 = _135;
_182._m0 = _181;
vec2 _191 = clamp(_82 + (vec3(0.0, -1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _203 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _191, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _207 = textureLod(SPIRV_Cross_Combined_1, _191, 0.0);
vec3 _223;
if (_207.y > 0.0)
{
_223 = _203 + (textureLod(SPIRV_Cross_Combined_2, _191, 0.0).xyz * clamp(_207.y * _207.z, 0.0, 1.0));
@ -190,14 +142,14 @@ void main()
{
_223 = _203;
}
_225 = _178 + 0.75;
vec3 _227 = _181.xyz + (_223 * 0.75);
_228 = vec4(_227.x, _227.y, _227.z, _181.w);
_229 = _182;
vec4 _228 = vec4(_227.x, _227.y, _227.z, _181.w);
_28 _229 = _182;
_229._m0 = _228;
vec2 _238 = clamp(_82 + (vec3(1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _250 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _238, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _254 = textureLod(SPIRV_Cross_Combined_1, _238, 0.0);
vec3 _270;
if (_254.y > 0.0)
{
_270 = _250 + (textureLod(SPIRV_Cross_Combined_2, _238, 0.0).xyz * clamp(_254.y * _254.z, 0.0, 1.0));
@ -206,14 +158,14 @@ void main()
{
_270 = _250;
}
_272 = _225 + 0.5;
vec3 _274 = _228.xyz + (_270 * 0.5);
_275 = vec4(_274.x, _274.y, _274.z, _228.w);
_276 = _229;
vec4 _275 = vec4(_274.x, _274.y, _274.z, _228.w);
_28 _276 = _229;
_276._m0 = _275;
vec2 _285 = clamp(_82 + (vec3(-2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _297 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _285, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _301 = textureLod(SPIRV_Cross_Combined_1, _285, 0.0);
vec3 _317;
if (_301.y > 0.0)
{
_317 = _297 + (textureLod(SPIRV_Cross_Combined_2, _285, 0.0).xyz * clamp(_301.y * _301.z, 0.0, 1.0));
@ -222,14 +174,14 @@ void main()
{
_317 = _297;
}
_319 = _272 + 0.5;
vec3 _321 = _275.xyz + (_317 * 0.5);
_322 = vec4(_321.x, _321.y, _321.z, _275.w);
_323 = _276;
vec4 _322 = vec4(_321.x, _321.y, _321.z, _275.w);
_28 _323 = _276;
_323._m0 = _322;
vec2 _332 = clamp(_82 + (vec3(-1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _344 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _332, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _348 = textureLod(SPIRV_Cross_Combined_1, _332, 0.0);
vec3 _364;
if (_348.y > 0.0)
{
_364 = _344 + (textureLod(SPIRV_Cross_Combined_2, _332, 0.0).xyz * clamp(_348.y * _348.z, 0.0, 1.0));
@ -238,14 +190,14 @@ void main()
{
_364 = _344;
}
_366 = _319 + 0.75;
vec3 _368 = _322.xyz + (_364 * 0.75);
_369 = vec4(_368.x, _368.y, _368.z, _322.w);
_370 = _323;
vec4 _369 = vec4(_368.x, _368.y, _368.z, _322.w);
_28 _370 = _323;
_370._m0 = _369;
vec2 _379 = clamp(_82 + (vec3(0.0, 0.0, 1.0).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _391 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _379, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _395 = textureLod(SPIRV_Cross_Combined_1, _379, 0.0);
vec3 _411;
if (_395.y > 0.0)
{
_411 = _391 + (textureLod(SPIRV_Cross_Combined_2, _379, 0.0).xyz * clamp(_395.y * _395.z, 0.0, 1.0));
@ -254,14 +206,14 @@ void main()
{
_411 = _391;
}
_413 = _366 + 1.0;
vec3 _415 = _369.xyz + (_411 * 1.0);
_416 = vec4(_415.x, _415.y, _415.z, _369.w);
_417 = _370;
vec4 _416 = vec4(_415.x, _415.y, _415.z, _369.w);
_28 _417 = _370;
_417._m0 = _416;
vec2 _426 = clamp(_82 + (vec3(1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _438 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _426, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _442 = textureLod(SPIRV_Cross_Combined_1, _426, 0.0);
vec3 _458;
if (_442.y > 0.0)
{
_458 = _438 + (textureLod(SPIRV_Cross_Combined_2, _426, 0.0).xyz * clamp(_442.y * _442.z, 0.0, 1.0));
@ -270,14 +222,14 @@ void main()
{
_458 = _438;
}
_460 = _413 + 0.75;
vec3 _462 = _416.xyz + (_458 * 0.75);
_463 = vec4(_462.x, _462.y, _462.z, _416.w);
_464 = _417;
vec4 _463 = vec4(_462.x, _462.y, _462.z, _416.w);
_28 _464 = _417;
_464._m0 = _463;
vec2 _473 = clamp(_82 + (vec3(2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _485 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _473, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _489 = textureLod(SPIRV_Cross_Combined_1, _473, 0.0);
vec3 _505;
if (_489.y > 0.0)
{
_505 = _485 + (textureLod(SPIRV_Cross_Combined_2, _473, 0.0).xyz * clamp(_489.y * _489.z, 0.0, 1.0));
@ -286,14 +238,14 @@ void main()
{
_505 = _485;
}
_507 = _460 + 0.5;
vec3 _509 = _463.xyz + (_505 * 0.5);
_510 = vec4(_509.x, _509.y, _509.z, _463.w);
_511 = _464;
vec4 _510 = vec4(_509.x, _509.y, _509.z, _463.w);
_28 _511 = _464;
_511._m0 = _510;
vec2 _520 = clamp(_82 + (vec3(-1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _532 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _520, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _536 = textureLod(SPIRV_Cross_Combined_1, _520, 0.0);
vec3 _552;
if (_536.y > 0.0)
{
_552 = _532 + (textureLod(SPIRV_Cross_Combined_2, _520, 0.0).xyz * clamp(_536.y * _536.z, 0.0, 1.0));
@ -302,14 +254,14 @@ void main()
{
_552 = _532;
}
_554 = _507 + 0.5;
vec3 _556 = _510.xyz + (_552 * 0.5);
_557 = vec4(_556.x, _556.y, _556.z, _510.w);
_558 = _511;
vec4 _557 = vec4(_556.x, _556.y, _556.z, _510.w);
_28 _558 = _511;
_558._m0 = _557;
vec2 _567 = clamp(_82 + (vec3(0.0, 1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _579 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _567, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _583 = textureLod(SPIRV_Cross_Combined_1, _567, 0.0);
vec3 _599;
if (_583.y > 0.0)
{
_599 = _579 + (textureLod(SPIRV_Cross_Combined_2, _567, 0.0).xyz * clamp(_583.y * _583.z, 0.0, 1.0));
@ -318,14 +270,14 @@ void main()
{
_599 = _579;
}
_601 = _554 + 0.75;
vec3 _603 = _557.xyz + (_599 * 0.75);
_604 = vec4(_603.x, _603.y, _603.z, _557.w);
_605 = _558;
vec4 _604 = vec4(_603.x, _603.y, _603.z, _557.w);
_28 _605 = _558;
_605._m0 = _604;
vec2 _614 = clamp(_82 + (vec3(1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _626 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _614, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _630 = textureLod(SPIRV_Cross_Combined_1, _614, 0.0);
vec3 _646;
if (_630.y > 0.0)
{
_646 = _626 + (textureLod(SPIRV_Cross_Combined_2, _614, 0.0).xyz * clamp(_630.y * _630.z, 0.0, 1.0));
@ -334,14 +286,14 @@ void main()
{
_646 = _626;
}
_648 = _601 + 0.5;
vec3 _650 = _604.xyz + (_646 * 0.5);
_651 = vec4(_650.x, _650.y, _650.z, _604.w);
_652 = _605;
vec4 _651 = vec4(_650.x, _650.y, _650.z, _604.w);
_28 _652 = _605;
_652._m0 = _651;
vec2 _661 = clamp(_82 + (vec3(0.0, 2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _673 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _661, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _677 = textureLod(SPIRV_Cross_Combined_1, _661, 0.0);
vec3 _693;
if (_677.y > 0.0)
{
_693 = _673 + (textureLod(SPIRV_Cross_Combined_2, _661, 0.0).xyz * clamp(_677.y * _677.z, 0.0, 1.0));
@ -354,7 +306,7 @@ void main()
vec4 _698 = vec4(_697.x, _697.y, _697.z, _651.w);
_28 _699 = _652;
_699._m0 = _698;
vec3 _702 = _698.xyz / vec3(_648 + 0.5);
vec3 _702 = _698.xyz / vec3(((((((((((((0.0 + 0.5) + 0.5) + 0.75) + 0.5) + 0.5) + 0.75) + 1.0) + 0.75) + 0.5) + 0.5) + 0.75) + 0.5) + 0.5);
_28 _704 = _699;
_704._m0 = vec4(_702.x, _702.y, _702.z, _698.w);
_28 _705 = _704;

View File

@ -16,10 +16,10 @@ int i;
void main()
{
vec4 _42;
i = 0;
vec4 _56;
_56 = _28.in_data[gl_GlobalInvocationID.x];
vec4 _42;
for (;;)
{
_42 = _28.mvp * _56;

View File

@ -16,12 +16,12 @@ uint _98;
void main()
{
int _40;
vec4 _93;
int _94;
_93 = _24.in_data[gl_GlobalInvocationID.x];
_94 = 0;
int _48;
int _40;
vec4 _46;
for (;;)
{

View File

@ -16,8 +16,8 @@ float4 _21;
void frag_main()
{
float4 _24;
float4 _33;
_24 = _21;
float4 _33;
for (;;)
{
if (counter == 10)

View File

@ -104,7 +104,6 @@ struct main0_out
fragment main0_out main0(main0_in in [[stage_in]], float4 gl_FragCoord [[position]], constant CB0& _19 [[buffer(0)]], texture3d<float> LightMapTexture [[texture(0)]], sampler LightMapSampler [[sampler(0)]], sampler ShadowMapSampler [[sampler(1)]], texture2d<float> ShadowMapTexture [[texture(1)]], texturecube<float> EnvironmentMapTexture [[texture(2)]], sampler EnvironmentMapSampler [[sampler(2)]], sampler DiffuseMapSampler [[sampler(3)]], texture2d<float> DiffuseMapTexture [[texture(3)]], sampler NormalMapSampler [[sampler(4)]], texture2d<float> NormalMapTexture [[texture(4)]], texture2d<float> NormalDetailMapTexture [[texture(5)]], sampler NormalDetailMapSampler [[sampler(5)]], texture2d<float> StudsMapTexture [[texture(6)]], sampler StudsMapSampler [[sampler(6)]], sampler SpecularMapSampler [[sampler(7)]], texture2d<float> SpecularMapTexture [[texture(7)]])
{
main0_out out = {};
bool _173;
VertexOutput _128 = _121;
_128.HPosition = gl_FragCoord;
VertexOutput _130 = _128;
@ -136,6 +135,7 @@ fragment main0_out main0(main0_in in [[stage_in]], float4 gl_FragCoord [[positio
float _163 = _146.View_Depth.w * _19.CB0.RefractionBias_FadeDistance_GlowFactor.y;
float _165 = clamp(1.0 - _163, 0.0, 1.0);
float2 _166 = in.IN_Uv_EdgeDistance1.xy * 1.0;
bool _173;
float4 _193;
do
{

View File

@ -19,8 +19,8 @@ fragment main0_out main0(main0_in in [[stage_in]])
{
main0_out out = {};
float4 _24;
float4 _33;
_24 = _21;
float4 _33;
for (;;)
{
if (in.counter == 10)

View File

@ -98,42 +98,6 @@ struct main0_out
fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buffer(0)]], texture2d<float> _8 [[texture(0)]], sampler _9 [[sampler(0)]], constant _10& _11 [[buffer(1)]], texture2d<float> _12 [[texture(1)]], sampler _13 [[sampler(1)]], texture2d<float> _14 [[texture(2)]], sampler _15 [[sampler(2)]], constant _18& _19 [[buffer(2)]])
{
main0_out out = {};
_28 _652;
float4 _651;
float _648;
_28 _605;
float4 _604;
float _601;
_28 _558;
float4 _557;
float _554;
_28 _511;
float4 _510;
float _507;
_28 _464;
float4 _463;
float _460;
_28 _229;
float4 _228;
float _225;
_28 _182;
float4 _181;
float _178;
float _413;
_28 _417;
float _131;
float4 _134;
_28 _135;
float _272;
float4 _275;
_28 _276;
float _319;
float4 _322;
_28 _323;
float _366;
float4 _369;
_28 _370;
float4 _416;
_28 _77 = _74;
_77._m0 = float4(0.0);
float2 _82 = gl_FragCoord.xy * _19._m23.xy;
@ -142,18 +106,6 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
float3 _109 = _11._m5 * clamp(_8.sample(_9, _97, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _113 = _12.sample(_13, _97, level(0.0));
float3 _129;
float3 _176;
float3 _223;
float3 _270;
float3 _317;
float3 _364;
float3 _411;
float3 _458;
float3 _505;
float3 _552;
float3 _599;
float3 _646;
float3 _693;
if (_113.y > 0.0)
{
_129 = _109 + (_14.sample(_15, _97, level(0.0)).xyz * clamp(_113.y * _113.z, 0.0, 1.0));
@ -162,14 +114,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_129 = _109;
}
_131 = 0.0 + 0.5;
float3 _133 = float4(0.0).xyz + (_129 * 0.5);
_134 = float4(_133.x, _133.y, _133.z, float4(0.0).w);
_135 = _77;
float4 _134 = float4(_133.x, _133.y, _133.z, float4(0.0).w);
_28 _135 = _77;
_135._m0 = _134;
float2 _144 = clamp(_82 + (float3(-1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _156 = _11._m5 * clamp(_8.sample(_9, _144, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _160 = _12.sample(_13, _144, level(0.0));
float3 _176;
if (_160.y > 0.0)
{
_176 = _156 + (_14.sample(_15, _144, level(0.0)).xyz * clamp(_160.y * _160.z, 0.0, 1.0));
@ -178,14 +130,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_176 = _156;
}
_178 = _131 + 0.5;
float3 _180 = _134.xyz + (_176 * 0.5);
_181 = float4(_180.x, _180.y, _180.z, _134.w);
_182 = _135;
float4 _181 = float4(_180.x, _180.y, _180.z, _134.w);
_28 _182 = _135;
_182._m0 = _181;
float2 _191 = clamp(_82 + (float3(0.0, -1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _203 = _11._m5 * clamp(_8.sample(_9, _191, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _207 = _12.sample(_13, _191, level(0.0));
float3 _223;
if (_207.y > 0.0)
{
_223 = _203 + (_14.sample(_15, _191, level(0.0)).xyz * clamp(_207.y * _207.z, 0.0, 1.0));
@ -194,14 +146,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_223 = _203;
}
_225 = _178 + 0.75;
float3 _227 = _181.xyz + (_223 * 0.75);
_228 = float4(_227.x, _227.y, _227.z, _181.w);
_229 = _182;
float4 _228 = float4(_227.x, _227.y, _227.z, _181.w);
_28 _229 = _182;
_229._m0 = _228;
float2 _238 = clamp(_82 + (float3(1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _250 = _11._m5 * clamp(_8.sample(_9, _238, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _254 = _12.sample(_13, _238, level(0.0));
float3 _270;
if (_254.y > 0.0)
{
_270 = _250 + (_14.sample(_15, _238, level(0.0)).xyz * clamp(_254.y * _254.z, 0.0, 1.0));
@ -210,14 +162,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_270 = _250;
}
_272 = _225 + 0.5;
float3 _274 = _228.xyz + (_270 * 0.5);
_275 = float4(_274.x, _274.y, _274.z, _228.w);
_276 = _229;
float4 _275 = float4(_274.x, _274.y, _274.z, _228.w);
_28 _276 = _229;
_276._m0 = _275;
float2 _285 = clamp(_82 + (float3(-2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _297 = _11._m5 * clamp(_8.sample(_9, _285, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _301 = _12.sample(_13, _285, level(0.0));
float3 _317;
if (_301.y > 0.0)
{
_317 = _297 + (_14.sample(_15, _285, level(0.0)).xyz * clamp(_301.y * _301.z, 0.0, 1.0));
@ -226,14 +178,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_317 = _297;
}
_319 = _272 + 0.5;
float3 _321 = _275.xyz + (_317 * 0.5);
_322 = float4(_321.x, _321.y, _321.z, _275.w);
_323 = _276;
float4 _322 = float4(_321.x, _321.y, _321.z, _275.w);
_28 _323 = _276;
_323._m0 = _322;
float2 _332 = clamp(_82 + (float3(-1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _344 = _11._m5 * clamp(_8.sample(_9, _332, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _348 = _12.sample(_13, _332, level(0.0));
float3 _364;
if (_348.y > 0.0)
{
_364 = _344 + (_14.sample(_15, _332, level(0.0)).xyz * clamp(_348.y * _348.z, 0.0, 1.0));
@ -242,14 +194,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_364 = _344;
}
_366 = _319 + 0.75;
float3 _368 = _322.xyz + (_364 * 0.75);
_369 = float4(_368.x, _368.y, _368.z, _322.w);
_370 = _323;
float4 _369 = float4(_368.x, _368.y, _368.z, _322.w);
_28 _370 = _323;
_370._m0 = _369;
float2 _379 = clamp(_82 + (float3(0.0, 0.0, 1.0).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _391 = _11._m5 * clamp(_8.sample(_9, _379, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _395 = _12.sample(_13, _379, level(0.0));
float3 _411;
if (_395.y > 0.0)
{
_411 = _391 + (_14.sample(_15, _379, level(0.0)).xyz * clamp(_395.y * _395.z, 0.0, 1.0));
@ -258,14 +210,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_411 = _391;
}
_413 = _366 + 1.0;
float3 _415 = _369.xyz + (_411 * 1.0);
_416 = float4(_415.x, _415.y, _415.z, _369.w);
_417 = _370;
float4 _416 = float4(_415.x, _415.y, _415.z, _369.w);
_28 _417 = _370;
_417._m0 = _416;
float2 _426 = clamp(_82 + (float3(1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _438 = _11._m5 * clamp(_8.sample(_9, _426, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _442 = _12.sample(_13, _426, level(0.0));
float3 _458;
if (_442.y > 0.0)
{
_458 = _438 + (_14.sample(_15, _426, level(0.0)).xyz * clamp(_442.y * _442.z, 0.0, 1.0));
@ -274,14 +226,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_458 = _438;
}
_460 = _413 + 0.75;
float3 _462 = _416.xyz + (_458 * 0.75);
_463 = float4(_462.x, _462.y, _462.z, _416.w);
_464 = _417;
float4 _463 = float4(_462.x, _462.y, _462.z, _416.w);
_28 _464 = _417;
_464._m0 = _463;
float2 _473 = clamp(_82 + (float3(2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _485 = _11._m5 * clamp(_8.sample(_9, _473, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _489 = _12.sample(_13, _473, level(0.0));
float3 _505;
if (_489.y > 0.0)
{
_505 = _485 + (_14.sample(_15, _473, level(0.0)).xyz * clamp(_489.y * _489.z, 0.0, 1.0));
@ -290,14 +242,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_505 = _485;
}
_507 = _460 + 0.5;
float3 _509 = _463.xyz + (_505 * 0.5);
_510 = float4(_509.x, _509.y, _509.z, _463.w);
_511 = _464;
float4 _510 = float4(_509.x, _509.y, _509.z, _463.w);
_28 _511 = _464;
_511._m0 = _510;
float2 _520 = clamp(_82 + (float3(-1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _532 = _11._m5 * clamp(_8.sample(_9, _520, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _536 = _12.sample(_13, _520, level(0.0));
float3 _552;
if (_536.y > 0.0)
{
_552 = _532 + (_14.sample(_15, _520, level(0.0)).xyz * clamp(_536.y * _536.z, 0.0, 1.0));
@ -306,14 +258,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_552 = _532;
}
_554 = _507 + 0.5;
float3 _556 = _510.xyz + (_552 * 0.5);
_557 = float4(_556.x, _556.y, _556.z, _510.w);
_558 = _511;
float4 _557 = float4(_556.x, _556.y, _556.z, _510.w);
_28 _558 = _511;
_558._m0 = _557;
float2 _567 = clamp(_82 + (float3(0.0, 1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _579 = _11._m5 * clamp(_8.sample(_9, _567, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _583 = _12.sample(_13, _567, level(0.0));
float3 _599;
if (_583.y > 0.0)
{
_599 = _579 + (_14.sample(_15, _567, level(0.0)).xyz * clamp(_583.y * _583.z, 0.0, 1.0));
@ -322,14 +274,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_599 = _579;
}
_601 = _554 + 0.75;
float3 _603 = _557.xyz + (_599 * 0.75);
_604 = float4(_603.x, _603.y, _603.z, _557.w);
_605 = _558;
float4 _604 = float4(_603.x, _603.y, _603.z, _557.w);
_28 _605 = _558;
_605._m0 = _604;
float2 _614 = clamp(_82 + (float3(1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _626 = _11._m5 * clamp(_8.sample(_9, _614, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _630 = _12.sample(_13, _614, level(0.0));
float3 _646;
if (_630.y > 0.0)
{
_646 = _626 + (_14.sample(_15, _614, level(0.0)).xyz * clamp(_630.y * _630.z, 0.0, 1.0));
@ -338,14 +290,14 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
{
_646 = _626;
}
_648 = _601 + 0.5;
float3 _650 = _604.xyz + (_646 * 0.5);
_651 = float4(_650.x, _650.y, _650.z, _604.w);
_652 = _605;
float4 _651 = float4(_650.x, _650.y, _650.z, _604.w);
_28 _652 = _605;
_652._m0 = _651;
float2 _661 = clamp(_82 + (float3(0.0, 2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _673 = _11._m5 * clamp(_8.sample(_9, _661, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _677 = _12.sample(_13, _661, level(0.0));
float3 _693;
if (_677.y > 0.0)
{
_693 = _673 + (_14.sample(_15, _661, level(0.0)).xyz * clamp(_677.y * _677.z, 0.0, 1.0));
@ -358,7 +310,7 @@ fragment main0_out main0(float4 gl_FragCoord [[position]], constant _6& _7 [[buf
float4 _698 = float4(_697.x, _697.y, _697.z, _651.w);
_28 _699 = _652;
_699._m0 = _698;
float3 _702 = _698.xyz / float3(_648 + 0.5);
float3 _702 = _698.xyz / float3(((((((((((((0.0 + 0.5) + 0.5) + 0.75) + 0.5) + 0.5) + 0.75) + 1.0) + 0.75) + 0.5) + 0.5) + 0.75) + 0.5) + 0.5);
_28 _704 = _699;
_704._m0 = float4(_702.x, _702.y, _702.z, _698.w);
_28 _705 = _704;

View File

@ -97,7 +97,6 @@ vec4 _297;
void main()
{
bool _173;
VertexOutput _128 = _121;
_128.HPosition = gl_FragCoord;
VertexOutput _130 = _128;
@ -129,6 +128,7 @@ void main()
float _163 = _146.View_Depth.w * _19.CB0.RefractionBias_FadeDistance_GlowFactor.y;
float _165 = clamp(1.0 - _163, 0.0, 1.0);
vec2 _166 = IN_Uv_EdgeDistance1.xy * 1.0;
bool _173;
vec4 _193;
do
{

View File

@ -8,8 +8,8 @@ vec4 _21;
void main()
{
vec4 _24;
vec4 _33;
_24 = _21;
vec4 _33;
for (;;)
{
if (counter == 10)

View File

@ -94,42 +94,6 @@ _28 _74;
void main()
{
_28 _652;
vec4 _651;
float _648;
_28 _605;
vec4 _604;
float _601;
_28 _558;
vec4 _557;
float _554;
_28 _511;
vec4 _510;
float _507;
_28 _464;
vec4 _463;
float _460;
_28 _229;
vec4 _228;
float _225;
_28 _182;
vec4 _181;
float _178;
float _413;
_28 _417;
float _131;
vec4 _134;
_28 _135;
float _272;
vec4 _275;
_28 _276;
float _319;
vec4 _322;
_28 _323;
float _366;
vec4 _369;
_28 _370;
vec4 _416;
_28 _77 = _74;
_77._m0 = vec4(0.0);
vec2 _82 = gl_FragCoord.xy * _19._m23.xy;
@ -138,18 +102,6 @@ void main()
vec3 _109 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _97, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _113 = textureLod(SPIRV_Cross_Combined_1, _97, 0.0);
vec3 _129;
vec3 _176;
vec3 _223;
vec3 _270;
vec3 _317;
vec3 _364;
vec3 _411;
vec3 _458;
vec3 _505;
vec3 _552;
vec3 _599;
vec3 _646;
vec3 _693;
if (_113.y > 0.0)
{
_129 = _109 + (textureLod(SPIRV_Cross_Combined_2, _97, 0.0).xyz * clamp(_113.y * _113.z, 0.0, 1.0));
@ -158,14 +110,14 @@ void main()
{
_129 = _109;
}
_131 = 0.0 + 0.5;
vec3 _133 = vec4(0.0).xyz + (_129 * 0.5);
_134 = vec4(_133.x, _133.y, _133.z, vec4(0.0).w);
_135 = _77;
vec4 _134 = vec4(_133.x, _133.y, _133.z, vec4(0.0).w);
_28 _135 = _77;
_135._m0 = _134;
vec2 _144 = clamp(_82 + (vec3(-1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _156 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _144, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _160 = textureLod(SPIRV_Cross_Combined_1, _144, 0.0);
vec3 _176;
if (_160.y > 0.0)
{
_176 = _156 + (textureLod(SPIRV_Cross_Combined_2, _144, 0.0).xyz * clamp(_160.y * _160.z, 0.0, 1.0));
@ -174,14 +126,14 @@ void main()
{
_176 = _156;
}
_178 = _131 + 0.5;
vec3 _180 = _134.xyz + (_176 * 0.5);
_181 = vec4(_180.x, _180.y, _180.z, _134.w);
_182 = _135;
vec4 _181 = vec4(_180.x, _180.y, _180.z, _134.w);
_28 _182 = _135;
_182._m0 = _181;
vec2 _191 = clamp(_82 + (vec3(0.0, -1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _203 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _191, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _207 = textureLod(SPIRV_Cross_Combined_1, _191, 0.0);
vec3 _223;
if (_207.y > 0.0)
{
_223 = _203 + (textureLod(SPIRV_Cross_Combined_2, _191, 0.0).xyz * clamp(_207.y * _207.z, 0.0, 1.0));
@ -190,14 +142,14 @@ void main()
{
_223 = _203;
}
_225 = _178 + 0.75;
vec3 _227 = _181.xyz + (_223 * 0.75);
_228 = vec4(_227.x, _227.y, _227.z, _181.w);
_229 = _182;
vec4 _228 = vec4(_227.x, _227.y, _227.z, _181.w);
_28 _229 = _182;
_229._m0 = _228;
vec2 _238 = clamp(_82 + (vec3(1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _250 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _238, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _254 = textureLod(SPIRV_Cross_Combined_1, _238, 0.0);
vec3 _270;
if (_254.y > 0.0)
{
_270 = _250 + (textureLod(SPIRV_Cross_Combined_2, _238, 0.0).xyz * clamp(_254.y * _254.z, 0.0, 1.0));
@ -206,14 +158,14 @@ void main()
{
_270 = _250;
}
_272 = _225 + 0.5;
vec3 _274 = _228.xyz + (_270 * 0.5);
_275 = vec4(_274.x, _274.y, _274.z, _228.w);
_276 = _229;
vec4 _275 = vec4(_274.x, _274.y, _274.z, _228.w);
_28 _276 = _229;
_276._m0 = _275;
vec2 _285 = clamp(_82 + (vec3(-2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _297 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _285, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _301 = textureLod(SPIRV_Cross_Combined_1, _285, 0.0);
vec3 _317;
if (_301.y > 0.0)
{
_317 = _297 + (textureLod(SPIRV_Cross_Combined_2, _285, 0.0).xyz * clamp(_301.y * _301.z, 0.0, 1.0));
@ -222,14 +174,14 @@ void main()
{
_317 = _297;
}
_319 = _272 + 0.5;
vec3 _321 = _275.xyz + (_317 * 0.5);
_322 = vec4(_321.x, _321.y, _321.z, _275.w);
_323 = _276;
vec4 _322 = vec4(_321.x, _321.y, _321.z, _275.w);
_28 _323 = _276;
_323._m0 = _322;
vec2 _332 = clamp(_82 + (vec3(-1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _344 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _332, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _348 = textureLod(SPIRV_Cross_Combined_1, _332, 0.0);
vec3 _364;
if (_348.y > 0.0)
{
_364 = _344 + (textureLod(SPIRV_Cross_Combined_2, _332, 0.0).xyz * clamp(_348.y * _348.z, 0.0, 1.0));
@ -238,14 +190,14 @@ void main()
{
_364 = _344;
}
_366 = _319 + 0.75;
vec3 _368 = _322.xyz + (_364 * 0.75);
_369 = vec4(_368.x, _368.y, _368.z, _322.w);
_370 = _323;
vec4 _369 = vec4(_368.x, _368.y, _368.z, _322.w);
_28 _370 = _323;
_370._m0 = _369;
vec2 _379 = clamp(_82 + (vec3(0.0, 0.0, 1.0).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _391 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _379, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _395 = textureLod(SPIRV_Cross_Combined_1, _379, 0.0);
vec3 _411;
if (_395.y > 0.0)
{
_411 = _391 + (textureLod(SPIRV_Cross_Combined_2, _379, 0.0).xyz * clamp(_395.y * _395.z, 0.0, 1.0));
@ -254,14 +206,14 @@ void main()
{
_411 = _391;
}
_413 = _366 + 1.0;
vec3 _415 = _369.xyz + (_411 * 1.0);
_416 = vec4(_415.x, _415.y, _415.z, _369.w);
_417 = _370;
vec4 _416 = vec4(_415.x, _415.y, _415.z, _369.w);
_28 _417 = _370;
_417._m0 = _416;
vec2 _426 = clamp(_82 + (vec3(1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _438 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _426, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _442 = textureLod(SPIRV_Cross_Combined_1, _426, 0.0);
vec3 _458;
if (_442.y > 0.0)
{
_458 = _438 + (textureLod(SPIRV_Cross_Combined_2, _426, 0.0).xyz * clamp(_442.y * _442.z, 0.0, 1.0));
@ -270,14 +222,14 @@ void main()
{
_458 = _438;
}
_460 = _413 + 0.75;
vec3 _462 = _416.xyz + (_458 * 0.75);
_463 = vec4(_462.x, _462.y, _462.z, _416.w);
_464 = _417;
vec4 _463 = vec4(_462.x, _462.y, _462.z, _416.w);
_28 _464 = _417;
_464._m0 = _463;
vec2 _473 = clamp(_82 + (vec3(2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _485 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _473, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _489 = textureLod(SPIRV_Cross_Combined_1, _473, 0.0);
vec3 _505;
if (_489.y > 0.0)
{
_505 = _485 + (textureLod(SPIRV_Cross_Combined_2, _473, 0.0).xyz * clamp(_489.y * _489.z, 0.0, 1.0));
@ -286,14 +238,14 @@ void main()
{
_505 = _485;
}
_507 = _460 + 0.5;
vec3 _509 = _463.xyz + (_505 * 0.5);
_510 = vec4(_509.x, _509.y, _509.z, _463.w);
_511 = _464;
vec4 _510 = vec4(_509.x, _509.y, _509.z, _463.w);
_28 _511 = _464;
_511._m0 = _510;
vec2 _520 = clamp(_82 + (vec3(-1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _532 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _520, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _536 = textureLod(SPIRV_Cross_Combined_1, _520, 0.0);
vec3 _552;
if (_536.y > 0.0)
{
_552 = _532 + (textureLod(SPIRV_Cross_Combined_2, _520, 0.0).xyz * clamp(_536.y * _536.z, 0.0, 1.0));
@ -302,14 +254,14 @@ void main()
{
_552 = _532;
}
_554 = _507 + 0.5;
vec3 _556 = _510.xyz + (_552 * 0.5);
_557 = vec4(_556.x, _556.y, _556.z, _510.w);
_558 = _511;
vec4 _557 = vec4(_556.x, _556.y, _556.z, _510.w);
_28 _558 = _511;
_558._m0 = _557;
vec2 _567 = clamp(_82 + (vec3(0.0, 1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _579 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _567, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _583 = textureLod(SPIRV_Cross_Combined_1, _567, 0.0);
vec3 _599;
if (_583.y > 0.0)
{
_599 = _579 + (textureLod(SPIRV_Cross_Combined_2, _567, 0.0).xyz * clamp(_583.y * _583.z, 0.0, 1.0));
@ -318,14 +270,14 @@ void main()
{
_599 = _579;
}
_601 = _554 + 0.75;
vec3 _603 = _557.xyz + (_599 * 0.75);
_604 = vec4(_603.x, _603.y, _603.z, _557.w);
_605 = _558;
vec4 _604 = vec4(_603.x, _603.y, _603.z, _557.w);
_28 _605 = _558;
_605._m0 = _604;
vec2 _614 = clamp(_82 + (vec3(1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _626 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _614, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _630 = textureLod(SPIRV_Cross_Combined_1, _614, 0.0);
vec3 _646;
if (_630.y > 0.0)
{
_646 = _626 + (textureLod(SPIRV_Cross_Combined_2, _614, 0.0).xyz * clamp(_630.y * _630.z, 0.0, 1.0));
@ -334,14 +286,14 @@ void main()
{
_646 = _626;
}
_648 = _601 + 0.5;
vec3 _650 = _604.xyz + (_646 * 0.5);
_651 = vec4(_650.x, _650.y, _650.z, _604.w);
_652 = _605;
vec4 _651 = vec4(_650.x, _650.y, _650.z, _604.w);
_28 _652 = _605;
_652._m0 = _651;
vec2 _661 = clamp(_82 + (vec3(0.0, 2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _673 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _661, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _677 = textureLod(SPIRV_Cross_Combined_1, _661, 0.0);
vec3 _693;
if (_677.y > 0.0)
{
_693 = _673 + (textureLod(SPIRV_Cross_Combined_2, _661, 0.0).xyz * clamp(_677.y * _677.z, 0.0, 1.0));
@ -354,7 +306,7 @@ void main()
vec4 _698 = vec4(_697.x, _697.y, _697.z, _651.w);
_28 _699 = _652;
_699._m0 = _698;
vec3 _702 = _698.xyz / vec3(_648 + 0.5);
vec3 _702 = _698.xyz / vec3(((((((((((((0.0 + 0.5) + 0.5) + 0.75) + 0.5) + 0.5) + 0.75) + 1.0) + 0.75) + 0.5) + 0.5) + 0.75) + 0.5) + 0.5);
_28 _704 = _699;
_704._m0 = vec4(_702.x, _702.y, _702.z, _698.w);
_28 _705 = _704;

View File

@ -48,14 +48,6 @@ uint32_t CFG::find_common_dominator(uint32_t a, uint32_t b) const
return a;
}
uint32_t CFG::update_common_dominator(uint32_t a, uint32_t b)
{
auto dominator = find_common_dominator(immediate_dominators[a], immediate_dominators[b]);
immediate_dominators[a] = dominator;
immediate_dominators[b] = dominator;
return dominator;
}
void CFG::build_immediate_dominators()
{
// Traverse the post-order in reverse and build up the immediate dominator tree.
@ -74,7 +66,7 @@ void CFG::build_immediate_dominators()
if (immediate_dominators[block])
{
assert(immediate_dominators[edge]);
immediate_dominators[block] = update_common_dominator(block, edge);
immediate_dominators[block] = find_common_dominator(block, edge);
}
else
immediate_dominators[block] = edge;

View File

@ -94,7 +94,6 @@ private:
bool post_order_visit(uint32_t block);
uint32_t visit_count = 0;
uint32_t update_common_dominator(uint32_t a, uint32_t b);
bool is_back_edge(uint32_t to) const;
};

View File

@ -8297,6 +8297,7 @@ void CompilerGLSL::emit_block_chain(SPIRBlock &block)
}
else if (continue_type == SPIRBlock::DoWhileLoop)
{
flush_undeclared_variables(block);
statement("do");
begin_scope();