From 6b522bf7160268c1dbf8f0d7603591be239b0a13 Mon Sep 17 00:00:00 2001 From: Perminder Singh <127239756+perminder-17@users.noreply.github.com> Date: Sun, 15 Sep 2024 04:16:42 +0530 Subject: [PATCH] fixing_shader Signed-off-by: Perminder Singh <127239756+perminder-17@users.noreply.github.com> --- avogadro/rendering/solid_first_fs.glsl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/avogadro/rendering/solid_first_fs.glsl b/avogadro/rendering/solid_first_fs.glsl index 32ecf7cc4c..df6a0f5a44 100644 --- a/avogadro/rendering/solid_first_fs.glsl +++ b/avogadro/rendering/solid_first_fs.glsl @@ -32,12 +32,10 @@ uniform float offset; uniform sampler2D inDepthTex; // 1.0 if enabled, 0.0 if disabled uniform float inAoEnabled; -// 1.0 if enabled, 0.0 if disabled -uniform float inFogEnabled; +// 0.0 if disabled +uniform float inFogStrength; // Shadow strength for SSAO uniform float inAoStrength; -// Fog strength -uniform float inFogStrength; // 1.0 if enabled, 0.0 if disabled uniform float inEdStrength; // offset for zoom-in and zoom-out @@ -142,7 +140,7 @@ void main() { luminosity *= max(1.2 * (1.0 - inAoEnabled), computeSSAOLuminosity(getNormalNear(UV))); luminosity *= max(1.0 - inEdStrength, computeEdgeLuminosity(getNormalAt(UV))); vec4 color = texture2D(inRGBTex, UV); - if(inFogEnabled == 0.0){ + if (inFogStrength == 0.0) { gl_FragColor = vec4(color.xyz * luminosity, color.w); } else { @@ -152,4 +150,4 @@ void main() { gl_FragColor = fogColor; } gl_FragDepth = texture2D(inDepthTex, UV).x; -} \ No newline at end of file +}