#version 450
// lens distortion 3
layout(set = 1, binding = 0) uniform sampler2D gBufferMap;
layout(set = 1, binding = 1) uniform sampler2D gBuffer1Map;

layout(location = 0) in VertexBlock
{
    vec2 mTexCoordsVec2;
} In;

layout(location = 0) out vec4 out_color0;

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

void main()
{

//vec2 lens = In.mTexCoordsVec2;
//lens.x += vk3d_params.stereo.x  * 0.5;

    vec3 _67 = textureLod(gBufferMap, In.mTexCoordsVec2, 0.0).xyz;
    float _181 = max((dot(_67, vec3(0.1500000059604644775390625, 0.25, 0.60000002384185791015625)) - 3.0) * 0.25, 0.0);
    out_color0 = vec4(((_67 * _181) / vec3(1.0 + _181)) * ((1.0 - textureLod(gBuffer1Map, In.mTexCoordsVec2, 0.0).w) * 0.100000001490116119384765625), 1.0);
}


