~ Fixed regression in composite layer handling

~ Properly fixed usage of "previous" as texture

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
Alexis Maiquez 2021-11-30 23:49:08 +01:00
parent b920e94870
commit 13bcd52e8c
2 changed files with 6 additions and 6 deletions

View File

@ -57,8 +57,8 @@ CImage::CImage (CScene* scene, Core::Objects::CImage* image) :
nameA << "_rt_imageLayerComposite_" << this->getImage ()->getId () << "_a"; nameA << "_rt_imageLayerComposite_" << this->getImage ()->getId () << "_a";
nameB << "_rt_imageLayerComposite_" << this->getImage ()->getId () << "_b"; nameB << "_rt_imageLayerComposite_" << this->getImage ()->getId () << "_b";
this->m_currentMainFBO = this->m_mainFBO = scene->createFBO (nameB.str (), ITexture::TextureFormat::ARGB8888, 1, this->m_texture->getRealWidth (), this->m_texture->getRealHeight (), this->m_texture->getRealWidth (), this->m_texture->getRealHeight ()); this->m_currentMainFBO = this->m_mainFBO = scene->createFBO (nameA.str (), ITexture::TextureFormat::ARGB8888, 1, this->m_texture->getRealWidth (), this->m_texture->getRealHeight (), this->m_texture->getRealWidth (), this->m_texture->getRealHeight ());
this->m_currentSubFBO = this->m_subFBO = scene->createFBO (nameA.str (), ITexture::TextureFormat::ARGB8888, 1, this->m_texture->getRealWidth (), this->m_texture->getRealHeight (), this->m_texture->getRealWidth (), this->m_texture->getRealHeight ()); this->m_currentSubFBO = this->m_subFBO = scene->createFBO (nameB.str (), ITexture::TextureFormat::ARGB8888, 1, this->m_texture->getRealWidth (), this->m_texture->getRealHeight (), this->m_texture->getRealWidth (), this->m_texture->getRealHeight ());
GLfloat realWidth = this->m_texture->getRealWidth () / 2; GLfloat realWidth = this->m_texture->getRealWidth () / 2;
GLfloat realHeight = this->m_texture->getRealHeight () / 2; GLfloat realHeight = this->m_texture->getRealHeight () / 2;

View File

@ -40,7 +40,7 @@ ITexture* CPass::resolveTexture (ITexture* expected, int index, ITexture* previo
if (it == this->m_fbos.end ()) if (it == this->m_fbos.end ())
return nullptr; return nullptr;
return (*it).second; expected = (*it).second;
} }
// first check in the binds and replace it if necessary // first check in the binds and replace it if necessary
@ -417,7 +417,7 @@ void CPass::setupUniforms ()
namestream << "g_Texture" << index << "Resolution"; namestream << "g_Texture" << index << "Resolution";
texture = this->resolveTexture ((*cur), index); texture = this->resolveTexture ((*cur), index, texture);
this->addUniform (namestream.str (), texture->getResolution ()); this->addUniform (namestream.str (), texture->getResolution ());
lastTextureIndex ++; lastTextureIndex ++;
} }
@ -437,7 +437,7 @@ void CPass::setupUniforms ()
namestream << "g_Texture" << (*cur).first << "Resolution"; namestream << "g_Texture" << (*cur).first << "Resolution";
texture = this->resolveTexture ((*cur).second, (*cur).first); texture = this->resolveTexture ((*cur).second, (*cur).first, texture);
this->addUniform (namestream.str (), texture->getResolution ()); this->addUniform (namestream.str (), texture->getResolution ());
} }
} }
@ -456,7 +456,7 @@ void CPass::setupUniforms ()
namestream << "g_Texture" << (*cur).first << "Resolution"; namestream << "g_Texture" << (*cur).first << "Resolution";
texture = this->resolveTexture ((*cur).second, (*cur).first); texture = this->resolveTexture ((*cur).second, (*cur).first, texture);
this->addUniform (namestream.str (), texture->getResolution ()); this->addUniform (namestream.str (), texture->getResolution ());
} }
} }