diff --git a/src/opengl/legacy/FBO.cpp b/src/opengl/legacy/FBO.cpp index aec72a939..dd4781d70 100644 --- a/src/opengl/legacy/FBO.cpp +++ b/src/opengl/legacy/FBO.cpp @@ -30,7 +30,7 @@ void FBO::configure(const Viewport &physicalViewport, int requestedSamples) resolvedFormat.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil); resolvedFormat.setSamples(0); resolvedFormat.setTextureTarget(GL_TEXTURE_2D); - resolvedFormat.setInternalTextureFormat(GL_RGBA8); + resolvedFormat.setInternalTextureFormat(GL_RGB8); m_resolvedFbo = std::make_unique(physicalSize, resolvedFormat); if (!m_resolvedFbo->isValid()) { @@ -47,7 +47,7 @@ void FBO::configure(const Viewport &physicalViewport, int requestedSamples) msFormat.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil); msFormat.setSamples(actualSamples); msFormat.setTextureTarget(GL_TEXTURE_2D_MULTISAMPLE); - msFormat.setInternalTextureFormat(GL_RGBA8); + msFormat.setInternalTextureFormat(GL_RGB8); m_multisamplingFbo = std::make_unique(physicalSize, msFormat); if (!m_multisamplingFbo->isValid()) { diff --git a/src/opengl/legacy/Legacy.cpp b/src/opengl/legacy/Legacy.cpp index cf5e608ac..36043cf0a 100644 --- a/src/opengl/legacy/Legacy.cpp +++ b/src/opengl/legacy/Legacy.cpp @@ -4,7 +4,6 @@ #include "Legacy.h" #include "../../display/Textures.h" -#include "../../global/ConfigConsts-Computed.h" #include "../../global/utils.h" #include "../OpenGLTypes.h" #include "../UboManager.h" @@ -395,17 +394,6 @@ void Functions::checkError() void Functions::configureFbo(int samples) { getFBO().configure(getPhysicalViewport(), samples); - - // WebGL2 lacks native support for texture swizzling - if constexpr (CURRENT_PLATFORM != PlatformEnum::Wasm) { - const GLuint textureId = getFBO().resolvedTextureId(); - if (textureId != 0) { - // Fix Wayland ghosting by forcing the alpha channel of the blit target to 1.0. - Base::glBindTexture(GL_TEXTURE_2D, textureId); - Base::glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_ONE); - Base::glBindTexture(GL_TEXTURE_2D, 0); - } - } } void Functions::bindFbo()