diff --git a/src/graphics/engine/cloud.cpp b/src/graphics/engine/cloud.cpp index e1c15ffc..6d08f644 100644 --- a/src/graphics/engine/cloud.cpp +++ b/src/graphics/engine/cloud.cpp @@ -21,6 +21,7 @@ #include "graphics/engine/cloud.h" #include "graphics/core/device.h" +#include "graphics/core/material.h" #include "graphics/core/renderers.h" #include "graphics/core/transparency.h" @@ -123,9 +124,7 @@ void CCloud::Draw() auto texture = m_engine->LoadTexture(m_fileName); renderer->SetAlbedoTexture(texture); - renderer->SetDetailTexture(Texture{}); - renderer->SetLighting(false); renderer->SetTransparency(TransparencyMode::BLACK); renderer->SetDepthMask(false); diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 351bbded..ae3cee38 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -3598,10 +3598,10 @@ void CEngine::DrawInterface() particleRenderer->End(); m_device->SetDepthTest(false); - - SetInterfaceCoordinates(); } + SetInterfaceCoordinates(); + // Draw foreground color if (m_overFront) DrawOverColor(); @@ -4257,6 +4257,7 @@ void CEngine::DrawPlanet() renderer->SetLighting(false); renderer->SetDepthTest(false); renderer->SetDepthMask(false); + renderer->SetCullFace(CullFace::NONE); m_planet->Draw(); // draws the planets diff --git a/src/graphics/opengl/gl33device.cpp b/src/graphics/opengl/gl33device.cpp index 0de13520..33ed7eb3 100644 --- a/src/graphics/opengl/gl33device.cpp +++ b/src/graphics/opengl/gl33device.cpp @@ -270,6 +270,8 @@ void CGL33Device::BeginScene() m_depthMask = true; glFrontFace(GL_CW); // Colobot issue: faces are reversed + m_cullFace = CullFace::NONE; + glDisable(GL_CULL_FACE); } void CGL33Device::EndScene() diff --git a/src/graphics/opengl/gl33objectrenderer.cpp b/src/graphics/opengl/gl33objectrenderer.cpp index 2986b30b..d46e0afe 100644 --- a/src/graphics/opengl/gl33objectrenderer.cpp +++ b/src/graphics/opengl/gl33objectrenderer.cpp @@ -205,6 +205,8 @@ void CGL33ObjectRenderer::CGL33ObjectRenderer::Begin() m_device->SetCullFace(CullFace::BACK); SetUVTransform({ 0.0f, 0.0f }, { 1.0f, 1.0f }); + SetAlphaScissor(0.0f); + SetFog(1e+6f, 1e+6, {}); } void CGL33ObjectRenderer::CGL33ObjectRenderer::End() diff --git a/src/graphics/opengl/gl33renderers.cpp b/src/graphics/opengl/gl33renderers.cpp index 4cea20af..1e5550b0 100644 --- a/src/graphics/opengl/gl33renderers.cpp +++ b/src/graphics/opengl/gl33renderers.cpp @@ -248,6 +248,7 @@ bool CGL33UIRenderer::EndPrimitive() UpdateUniforms(); m_device->SetDepthTest(false); + m_device->SetCullFace(CullFace::NONE); if (m_drawCount == 1) glDrawArrays(TranslateGfxPrimitive(m_type), m_first.front(), m_count.front());