2017-12-05 16:44:52 +00:00
|
|
|
#version 450
|
2021-06-03 10:00:29 +00:00
|
|
|
#if defined(GL_EXT_control_flow_attributes)
|
|
|
|
#extension GL_EXT_control_flow_attributes : require
|
|
|
|
#define SPIRV_CROSS_FLATTEN [[flatten]]
|
|
|
|
#define SPIRV_CROSS_BRANCH [[dont_flatten]]
|
|
|
|
#define SPIRV_CROSS_UNROLL [[unroll]]
|
|
|
|
#define SPIRV_CROSS_LOOP [[dont_unroll]]
|
|
|
|
#else
|
|
|
|
#define SPIRV_CROSS_FLATTEN
|
|
|
|
#define SPIRV_CROSS_BRANCH
|
|
|
|
#define SPIRV_CROSS_UNROLL
|
|
|
|
#define SPIRV_CROSS_LOOP
|
|
|
|
#endif
|
2017-12-05 16:44:52 +00:00
|
|
|
|
|
|
|
layout(binding = 0, std140) uniform Foo
|
|
|
|
{
|
|
|
|
layout(row_major) mat4 lightVP[64];
|
|
|
|
uint shadowCascadesNum;
|
|
|
|
int test;
|
|
|
|
} _11;
|
|
|
|
|
|
|
|
layout(location = 0) in vec3 fragWorld;
|
|
|
|
layout(location = 0) out int _entryPointOutput;
|
|
|
|
|
2020-05-20 14:27:49 +00:00
|
|
|
int _231;
|
2018-03-24 03:16:18 +00:00
|
|
|
|
2020-11-23 14:42:27 +00:00
|
|
|
mat4 spvWorkaroundRowMajor(mat4 wrap) { return wrap; }
|
2020-10-14 13:51:49 +00:00
|
|
|
|
2018-03-24 03:16:18 +00:00
|
|
|
void main()
|
2017-12-05 16:44:52 +00:00
|
|
|
{
|
2020-05-20 14:27:49 +00:00
|
|
|
int _228;
|
2020-06-23 13:39:04 +00:00
|
|
|
do
|
2017-12-05 16:44:52 +00:00
|
|
|
{
|
2020-06-23 13:39:04 +00:00
|
|
|
bool _225;
|
|
|
|
int _229;
|
|
|
|
uint _222 = 0u;
|
2021-06-03 10:19:10 +00:00
|
|
|
SPIRV_CROSS_UNROLL
|
2020-06-23 13:39:04 +00:00
|
|
|
for (;;)
|
2017-12-05 16:44:52 +00:00
|
|
|
{
|
2020-06-23 13:39:04 +00:00
|
|
|
if (_222 < _11.shadowCascadesNum)
|
2018-03-24 03:16:18 +00:00
|
|
|
{
|
2020-06-23 13:39:04 +00:00
|
|
|
mat4 _223;
|
|
|
|
do
|
2018-09-27 09:10:22 +00:00
|
|
|
{
|
2020-06-23 13:39:04 +00:00
|
|
|
if (_11.test == 0)
|
2018-09-27 09:10:22 +00:00
|
|
|
{
|
2020-06-23 13:39:04 +00:00
|
|
|
_223 = mat4(vec4(0.5, 0.0, 0.0, 0.0), vec4(0.0, 0.5, 0.0, 0.0), vec4(0.0, 0.0, 0.5, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
|
2018-09-27 09:10:22 +00:00
|
|
|
break;
|
|
|
|
}
|
2020-06-23 13:39:04 +00:00
|
|
|
_223 = mat4(vec4(1.0, 0.0, 0.0, 0.0), vec4(0.0, 1.0, 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
|
|
|
|
break;
|
|
|
|
} while(false);
|
2020-11-23 14:42:27 +00:00
|
|
|
vec4 _170 = (_223 * spvWorkaroundRowMajor(_11.lightVP[_222])) * vec4(fragWorld, 1.0);
|
2020-06-23 13:39:04 +00:00
|
|
|
float _172 = _170.z;
|
|
|
|
float _179 = _170.x;
|
|
|
|
float _181 = _170.y;
|
|
|
|
if ((((_172 >= 0.0) && (_172 <= 1.0)) && (max(_179, _181) <= 1.0)) && (min(_179, _181) >= 0.0))
|
2018-09-27 09:10:22 +00:00
|
|
|
{
|
2020-06-23 13:39:04 +00:00
|
|
|
_229 = int(_222);
|
|
|
|
_225 = true;
|
2018-09-27 09:10:22 +00:00
|
|
|
break;
|
|
|
|
}
|
2020-06-23 13:39:04 +00:00
|
|
|
_222++;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
_229 = _231;
|
|
|
|
_225 = false;
|
|
|
|
break;
|
2018-03-24 03:16:18 +00:00
|
|
|
}
|
2017-12-05 16:44:52 +00:00
|
|
|
}
|
2020-09-17 10:02:43 +00:00
|
|
|
if (_225)
|
|
|
|
{
|
|
|
|
_228 = _229;
|
|
|
|
break;
|
|
|
|
}
|
2020-06-23 13:39:04 +00:00
|
|
|
_228 = -1;
|
|
|
|
break;
|
|
|
|
} while(false);
|
2020-05-20 14:27:49 +00:00
|
|
|
_entryPointOutput = _228;
|
2017-12-05 16:44:52 +00:00
|
|
|
}
|
|
|
|
|