15/shaders/skybox.frag

17 lines
278 B
GLSL
Raw Normal View History

2023-01-16 16:08:26 +00:00
#version 420 core
2023-01-15 19:09:29 +00:00
out vec4 FragColor;
in vec3 TexCoords;
uniform samplerCube skybox;
2023-01-16 16:08:26 +00:00
layout(std140, binding = 4) uniform gamma
{
float inv_gamma;
};
2023-01-15 19:09:29 +00:00
void main()
{
2023-01-16 16:08:26 +00:00
FragColor.rgb = pow(texture(skybox, TexCoords).rgb, vec3(inv_gamma));
2023-01-15 19:09:29 +00:00
gl_FragDepth = 0.9999f;
}