layout (rgba16f, set = 0, binding = 0) uniform image2D DrawImage;

layout (set = 1, binding = 0) uniform texture2D SpriteAtlasArray[24];

layout (set = 1, binding = 1) uniform sampler SamplerNearest;

layout (push_constant) uniform Constants {
	mat4 projection;
	uint atlas_index;
} PC;

#define SpriteAtlas SpriteAtlasArray[PC.atlas_index]

#ifdef VERT_SHADER
# define FragData     out struct FragDataOut
# define FragDataFlat flat out struct FragDataFlatOut
#endif

#ifdef FRAG_SHADER
# define FragData     in struct FragDataIn
# define FragDataFlat flat in struct FragDataFlatIn
#endif

layout (location = 0) FragDataFlat
{
	uint has_texture;
} FDF;

layout (location = 1) FragData
{
	vec4  color;
	vec2  uv;
	vec2  dst_pos;
	vec2  dst_center;
	vec2  dst_half_size;
	vec2  sdf_sample_pos;
	float corner_radius;
	float softness;
	float raised;
	float border_thickness;
} FD;
