#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 cxadd;
    vec4 cxmul;
    vec4 mvp[4];
} _23;

layout(location = 0) in vec4 pos;
layout(location = 1) out vec4 vcolor;
layout(location = 1) in vec4 acolor;
layout(location = 0) out vec2 tc0;
layout(location = 2) in vec2 atc;

void main()
{
    gl_Position.x = dot(pos, _23.mvp[0]);
    gl_Position.y = -dot(pos, _23.mvp[1]);
    gl_Position.z = dot(pos, _23.mvp[2]);
    gl_Position.w = dot(pos, _23.mvp[3]);

// Vk3DVision (http://3dsurroundgaming.com/) - Stereo Injection
gl_Position.x += vk3d_params.stereo.x * (gl_Position.w - vk3d_params.stereo.y) * 0.05; 
    vcolor = (acolor * _23.cxmul) + _23.cxadd;
    tc0 = atc;
}


