#version 420

uniform samplerCube skybox;

in vec4 fragmentVertex; //just the interpolated vertex coords of the rendered fragment of the AABox.

out vec4 fragColor;

void main(void)
{
    vec3 dir = normalize(fragmentVertex.xyz);

    vec4 environmentColor = texture(skybox, dir);

    fragColor = environmentColor;
}
