#version 430
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable

#ifdef VULKAN
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation)
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy * uf_fragCoordScale.xy, gl_FragCoord.zw)
#else
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy * uf_fragCoordScale, gl_FragCoord.zw)
#endif

#ifdef VULKAN
layout(set = 1, binding = 2) uniform ufBlock
{
    uniform vec4 uf_fragCoordScale;
};
#else
uniform vec2 uf_fragCoordScale;
#endif

TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
layout(location = 0) in vec4 passParameterSem133;
layout(location = 0) out vec4 passPixelColor0;

void main()
{
    // Bypass all logic and pass the input texture as output
    passPixelColor0 = texture(textureUnitPS0, passParameterSem133.xy);
}
