diff --git a/avogadro/rendering/solidpipeline.cpp b/avogadro/rendering/solidpipeline.cpp index ac772e62a5..b8232162f4 100644 --- a/avogadro/rendering/solidpipeline.cpp +++ b/avogadro/rendering/solidpipeline.cpp @@ -16,7 +16,7 @@ #include -#include +#include namespace Avogadro::Rendering { @@ -160,22 +160,24 @@ void SolidPipeline::end() d->depthTexture, m_width, m_height); d->firstStageShaders.setUniformValue("inAoEnabled", m_aoEnabled ? 1.0f : 0.0f); d->firstStageShaders.setUniformValue("inAoStrength", m_aoStrength); - d->firstStageShaders.setUniformValue("inFogStrength", (m_fogStrength)); d->firstStageShaders.setUniformValue("inEdStrength", m_edStrength); d->firstStageShaders.setUniformValue("inFogEnabled", m_fogEnabled ? 1.0f : 0.0f); + d->firstStageShaders.setUniformValue("inFogStrength", m_fogEnabled ? m_fogStrength : 0.0f); d->firstStageShaders.setUniformValue("inFogPosition", m_fogPosition); d->firstStageShaders.setUniformValue("fogR", (m_backgroundColor[0])/255.0f); d->firstStageShaders.setUniformValue("fogG", (m_backgroundColor[1])/255.0f); d->firstStageShaders.setUniformValue("fogB", (m_backgroundColor[2])/255.0f); glDrawArrays(GL_TRIANGLES, 0, 6); - // std::cout<