
// Vk3DVision (http://3dsurroundgaming.com/) - Original Shader
#version 450

layout(set = 0, binding = 0, std140) uniform freqHigh_vertexUniforms_ubo
{
    vec4 postexposurecontrol;
} freqHigh_vertexUniforms;

layout(set = 0, binding = 1) uniform sampler2D samp_tex2;

layout(location = 0) in vec4 in_Position;
layout(location = 2) out vec4 vofi_TexCoord0;

vec4 tex2Dlod(sampler2D image, vec4 texcoord)
{
    return textureLod(image, texcoord.xy, texcoord.w);
}

void main()
{
    gl_Position = in_Position;
    vec4 param = vec4(0.5, 0.5, 0.0, 0.0);
    vofi_TexCoord0.x = tex2Dlod(samp_tex2, param).x;
    vofi_TexCoord0.x *= max(0.0, (freqHigh_vertexUniforms.postexposurecontrol.x * 8.0) - 7.0);
    gl_Position.y = -gl_Position.y;
}

