mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-13 21:02:34 +08:00
g_ModelViewProjectionMatrix should now have the right values for passes (fixes sun not displaying properly in 2882477794)
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
f4ccf40e14
commit
6f570be911
@ -222,7 +222,8 @@ CImage::CImage (CScene* scene, Core::Objects::CImage* image) :
|
||||
this->getScene ()->getCamera ()->getProjection () *
|
||||
this->getScene ()->getCamera ()->getLookAt ();
|
||||
|
||||
this->m_modelViewProjectionPass = glm::ortho <float> (0.0, size.x, 0.0, size.y);
|
||||
this->m_modelViewProjectionPass = glm::mat4(1.0f);
|
||||
this->m_modelViewProjectionCopy = glm::ortho <float> (0.0, size.x, 0.0, size.y);
|
||||
}
|
||||
|
||||
void CImage::setup ()
|
||||
@ -329,13 +330,15 @@ void CImage::setupPasses ()
|
||||
|
||||
auto cur = this->m_passes.begin ();
|
||||
auto end = this->m_passes.end ();
|
||||
bool first = true;
|
||||
|
||||
for (; cur != end; cur ++)
|
||||
{
|
||||
Effects::CPass* pass = *cur;
|
||||
const CFBO* prevDrawTo = drawTo;
|
||||
GLuint spacePosition = this->getCopySpacePosition ();
|
||||
glm::mat4* projection = &this->m_modelViewProjectionPass;
|
||||
GLuint spacePosition = (first) ? this->getCopySpacePosition () : this->getPassSpacePosition ();
|
||||
glm::mat4* projection = (first) ? &this->m_modelViewProjectionCopy : &this->m_modelViewProjectionPass;
|
||||
first = false;
|
||||
|
||||
// set viewport and target texture if needed
|
||||
if (pass->getMaterial ()->getMaterial ()->hasTarget () == true)
|
||||
|
@ -72,6 +72,7 @@ namespace WallpaperEngine::Render::Objects
|
||||
|
||||
glm::mat4 m_modelViewProjectionScreen;
|
||||
glm::mat4 m_modelViewProjectionPass;
|
||||
glm::mat4 m_modelViewProjectionCopy;
|
||||
|
||||
CFBO* m_mainFBO;
|
||||
CFBO* m_subFBO;
|
||||
|
Loading…
Reference in New Issue
Block a user