diff --git a/src/deferredpipeline.cpp b/src/deferredpipeline.cpp index 3d2b717..d22cdeb 100644 --- a/src/deferredpipeline.cpp +++ b/src/deferredpipeline.cpp @@ -152,12 +152,13 @@ void DeferredPipeline::renderGL(Scene *scene) // LIGHTING PASS m_lightingBuffer->bindFBO(); - if(m_skybox != nullptr) - m_skybox->renderGL(m_camera); glDepthFunc(GL_LEQUAL); glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + if(m_skybox != nullptr) + m_skybox->renderGL(m_camera); + m_gBuffer->bindTextures(); for(SceneIterator* lightIt = scene->getLights(); lightIt->isValid(); lightIt->next())