#version 450
/*
 * Copyright 2023 TU Wien, Institute of Visual Computing & Human-Centered Technology.
 * This file is part of the GCG Lab Framework and must not be redistributed.
 *
 * Original version created by Lukas Gersthofer and Bernhard Steiner.
 * Vulkan edition created by Johannes Unterguggenberger (junt@cg.tuwien.ac.at).
 */
 
layout (location = 0) in vec4 in_color;

layout (location = 0) out vec4 out_color;

void main() {	
	out_color = in_color;
	float edgeThickness = 0.15f;
	if (abs(0.5f - gl_PointCoord.x) > 0.5f - edgeThickness) {
		out_color = vec4(0, 0, 0, 1);
	} else if (abs(0.5f - gl_PointCoord.y) > 0.5f - edgeThickness) {
		out_color = vec4(in_color.rgb * 0.1f, 1);
	}
}

