Шейдеры для скайбокса
This commit is contained in:
parent
7ecfffb492
commit
190ea7d84d
|
@ -0,0 +1,12 @@
|
|||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec3 TexCoords;
|
||||
|
||||
uniform samplerCube skybox;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = texture(skybox, TexCoords);
|
||||
gl_FragDepth = 0.9999f;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
#version 420 core
|
||||
layout (location = 0) in vec3 pos;
|
||||
|
||||
out vec3 TexCoords;
|
||||
|
||||
layout(std140, binding = 0) uniform Camera
|
||||
{
|
||||
mat4 projection;
|
||||
mat4 view;
|
||||
vec3 position;
|
||||
} camera;
|
||||
|
||||
void main()
|
||||
{
|
||||
TexCoords = pos;
|
||||
gl_Position = camera.projection * mat4(mat3(camera.view)) * vec4(pos, 1.0);
|
||||
}
|
Loading…
Reference in New Issue