// Store a fragment shader source code as string
// Always Define Version!
#version 460 core
in vec2 texCoords2D;

uniform samplerCube textureUnit;
uniform vec3 lightPosition;
// uniform float farPlane;


out vec4 FragColor; // Define output (mandatory) which must be a color vector (r,g,b,transparency)

void main()
{
	float farPlane = 50.0f;
	float nearPlane = 1.0f;
	vec2  normalizedTexCoords2D = 5*(texCoords2D - vec2(0.8f,0.8f));
	vec3  sampleDirection = vec3(1, normalizedTexCoords2D.x, normalizedTexCoords2D.y);
	float sampledDepth = texture(textureUnit, sampleDirection).r;
	FragColor = vec4(vec3(sampledDepth), 1);

};
