LearnOpenGL/Shaders/HDRSkybox.fs

15 lines
300 B
Forth
Raw Permalink Normal View History

2023-06-02 16:01:45 +00:00
#version 460 core
out vec4 FragColor;
in vec3 localPos;
uniform samplerCube environmentMap;
void main(){
vec3 envColor = texture(environmentMap, localPos).rgb;
envColor = envColor /(envColor + vec3(1.0));
envColor = pow(envColor, vec3(1.0/2.2));
FragColor = vec4(envColor,1.0);
}