diff --git a/engine/gl/r_bishaders.h b/engine/gl/r_bishaders.h index 2bd37187f..0958cb968 100644 --- a/engine/gl/r_bishaders.h +++ b/engine/gl/r_bishaders.h @@ -4497,6 +4497,7 @@ YOU SHOULD NOT EDIT THIS FILE BY HAND {QR_OPENGL, 110, "defaultskybox", "!!permu FOG\n" "!!samps reflectcube\n" +"!!cvardf r_skyfog=0.5\n" "#include \"sys/defs.h\"\n" "#include \"sys/fog.h\"\n" @@ -4515,7 +4516,7 @@ YOU SHOULD NOT EDIT THIS FILE BY HAND "void main ()\n" "{\n" "vec4 skybox = textureCube(s_reflectcube, pos);\n" -"gl_FragColor = vec4(fog3(skybox.rgb), 1.0);\n" +"gl_FragColor = vec4(mix(skybox.rgb, fog3(skybox.rgb), float(r_skyfog)), 1.0);\n" "}\n" "#endif\n" }, diff --git a/engine/shaders/glsl/defaultskybox.glsl b/engine/shaders/glsl/defaultskybox.glsl index 7af902c8a..32008b693 100644 --- a/engine/shaders/glsl/defaultskybox.glsl +++ b/engine/shaders/glsl/defaultskybox.glsl @@ -1,5 +1,6 @@ !!permu FOG !!samps reflectcube +!!cvardf r_skyfog=0.5 #include "sys/defs.h" #include "sys/fog.h" @@ -18,6 +19,6 @@ void main () void main () { vec4 skybox = textureCube(s_reflectcube, pos); - gl_FragColor = vec4(fog3(skybox.rgb), 1.0); + gl_FragColor = vec4(mix(skybox.rgb, fog3(skybox.rgb), float(r_skyfog)), 1.0); } #endif