aboutsummaryrefslogtreecommitdiff
path: root/Assets/Shaders/Skybox.glsl
blob: 654bed1ec03a7f20acfea1887eea62ad97d7faff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#type vertex

#version 330 core

layout (location = 0) in vec3 aPos;

out vec3 TexCoords;

uniform mat4 u_Projection;
uniform mat4 u_View;

void main()
{
    TexCoords   = aPos;
    vec4 pos    = u_Projection * u_View * vec4(aPos, 1.0);
    gl_Position = pos.xyww;
}

#type fragment

#version 330 core

out vec4 FragColor;
in  vec3 TexCoords;

uniform samplerCube u_Skybox;

void main()
{
    FragColor = texture(u_Skybox, TexCoords);
}