IK is working!!!
[opengl.git] / skyboxfrag.glsl
index 90c7ebe21b9ab7b9df7421ea4ffd97be064fab86..81bf58bcd3d0e2dc3a9dea269a498ccc3114ae95 100644 (file)
@@ -1,10 +1,13 @@
 #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);
 }