From a2f5ed00374afef940398b3e04ff87cd35d6449a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 29 Mar 2015 08:26:45 +0200 Subject: [PATCH] Don't apply fog to alpha channel --HG-- branch : opengl3 --- code/nel/src/3d/driver/opengl3/driver_opengl_pixel_program.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/nel/src/3d/driver/opengl3/driver_opengl_pixel_program.cpp b/code/nel/src/3d/driver/opengl3/driver_opengl_pixel_program.cpp index 6d8588b9f..b81dfa91f 100644 --- a/code/nel/src/3d/driver/opengl3/driver_opengl_pixel_program.cpp +++ b/code/nel/src/3d/driver/opengl3/driver_opengl_pixel_program.cpp @@ -552,6 +552,7 @@ void ppGenerate(std::string &result, const CPPBuiltin &desc, CGlExtensions &glex ss << "float fogFactor = (fogParams.t - z) / (fogParams.t - fogParams.s);" << std::endl; ss << "fogFactor = clamp(fogFactor, 0.0, 1.0);" << std::endl; ss << "vec4 fColor = mix(fogColor, col, fogFactor);" << std::endl; + ss << "fColor.a = col.a;" << std::endl; ss << "return fColor;" << std::endl; ss << "}" << std::endl; ss << std::endl;