// Videos
#version 450

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

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

layout(location = 0) in vec4 in_Position;
layout(location = 2) out vec4 vofi_TexCoord0;
layout(location = 1) in vec2 in_TexCoord;
layout(location = 0) out vec4 vofi_Color;
layout(location = 3) in vec4 in_Color;

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

void main()
{
    vec4 param = in_Position;
    vec4 param_1 = freqHigh_vertexUniforms.mvpmatrixx;
    gl_Position.x = dot4(param, param_1);
    vec4 param_2 = in_Position;
    vec4 param_3 = freqHigh_vertexUniforms.mvpmatrixy;
    gl_Position.y = dot4(param_2, param_3);
    vec4 param_4 = in_Position;
    vec4 param_5 = freqHigh_vertexUniforms.mvpmatrixz;
    gl_Position.z = dot4(param_4, param_5);
    vec4 param_6 = in_Position;
    vec4 param_7 = freqHigh_vertexUniforms.mvpmatrixw;
    gl_Position.w = dot4(param_6, param_7);
    vofi_TexCoord0 = vec4(in_TexCoord.x, in_TexCoord.y, 0.0, 0.0);
    vofi_Color = in_Color;
    gl_Position.y = -gl_Position.y;
    gl_Position.x += vk3d_params.stereo.x * vk3d_params.custom_params.x;
}


