// SHADOWS
// Vk3DVision (http://3dsurroundgaming.com/) - Original Shader
#version 450

layout(set = 0, binding = 1, std140) uniform freqLow_vertexUniforms_ubo
{
    vec4 vertexxyzscale;
    vec4 vertexxyzbias;
} freqLow_vertexUniforms;

layout(set = 0, binding = 0, std140) uniform freqHigh_vertexUniforms_ubo
{
    vec4 mvpmatrixx;
    vec4 mvpmatrixy;
    vec4 mvpmatrixz;
    vec4 mvpmatrixw;
} freqHigh_vertexUniforms;

layout(location = 0) in vec4 in_Position;

float dot4(vec4 a, vec4 b)
{
    return dot(a, b);
}

void main()
{
    vec4 localPosition = (in_Position * freqLow_vertexUniforms.vertexxyzscale) + freqLow_vertexUniforms.vertexxyzbias;
    vec4 param = localPosition;
    vec4 param_1 = freqHigh_vertexUniforms.mvpmatrixx;
    gl_Position.x = dot4(param, param_1);
    vec4 param_2 = localPosition;
    vec4 param_3 = freqHigh_vertexUniforms.mvpmatrixy;
    gl_Position.y = dot4(param_2, param_3);
    vec4 param_4 = localPosition;
    vec4 param_5 = freqHigh_vertexUniforms.mvpmatrixz;
    gl_Position.z = dot4(param_4, param_5);
    vec4 param_6 = localPosition;
    vec4 param_7 = freqHigh_vertexUniforms.mvpmatrixw;
    gl_Position.w = dot4(param_6, param_7);
    gl_Position.y = -gl_Position.y;
}

