//UI
#version 450


// Vk3DVision (http://3dsurroundgaming.com/) - Stereo Injection
layout(set = 0, binding = 99, std140) uniform Vk3DParams
{
    vec4 stereo;
    vec4 custom_params;
}
 vk3d_params;

layout(set = 0, binding = 0, std140) uniform VConstants
{
    vec4 mvp[4];
    vec4 texgen[2];
} _25;

layout(location = 0) in vec4 pos;
layout(location = 1) out vec2 tc0;
layout(location = 0) out vec4 factor;
layout(location = 1) in vec4 afactor;

void main()
{
    gl_Position.x = dot(pos, _25.mvp[0]);

// Vk3DVision (http://3dsurroundgaming.com/) - Stereo Injection
    gl_Position.y = -dot(pos, _25.mvp[1]);
    gl_Position.z = dot(pos, _25.mvp[2]);
    gl_Position.w = dot(pos, _25.mvp[3]);
    gl_Position.x += vk3d_params.stereo.x * (gl_Position.w - vk3d_params.stereo.y) * 0.05;
    tc0.x = dot(pos, _25.texgen[0]);
    tc0.y = dot(pos, _25.texgen[1]);
    factor = afactor;
}



