// LENS FLARES - Fixed oclussion
#version 450

invariant gl_Position;

const vec2 _26[6] = vec2[](vec2(-0.5), vec2(0.5, -0.5), vec2(0.5), vec2(-0.5), vec2(0.5), vec2(-0.5, 0.5));

struct LF_OCCLUSION_CONSTANT_BUFFER
{
    mat4 _mWVPMatrix;
};

// 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 = 52, std140) uniform dyn_CONSTANT_BUFFER_BLOCK_0
{
    LF_OCCLUSION_CONSTANT_BUFFER _Lensflares;
} _39;

void main()
{

// Vk3DVision (http://3dsurroundgaming.com/) - Stereo Injection
        //return;
    vec4 _57 = vec4(_26[gl_VertexIndex], 0.0, 1.0);
    vec4 _58 = _39._Lensflares._mWVPMatrix * _57;
    gl_Position = _58;
    //gl_Position.x += vk3d_params.stereo.x * (gl_Position.w - vk3d_params.stereo.y);
    gl_Position.x += vk3d_params.stereo.x * (1.0 - gl_Position.z * vk3d_params.stereo.y); 
}




