#version 330
-in vec3 texCoords;
+in vec3 localPos;
out vec4 fragColor;
uniform samplerCube skybox;
void main() {
- fragColor = texture(skybox, texCoords);
+ vec3 env = texture(skybox, localPos).rgb;
+ env = env / (env + vec3(1.f));
+ env = pow(env, vec3(1.f / 2.2));
+ fragColor = vec4(env, 1.f);
}