chore: fix default uniform values not being applied in the right order

This commit is contained in:
Almamu 2025-08-20 00:46:11 +02:00
parent e3e377ecdd
commit ce51cd23fa
2 changed files with 3 additions and 2 deletions

View File

@ -89,7 +89,7 @@ CImage::CImage (Wallpapers::CScene& scene, const Image& image) :
if (!textures.empty ()) { if (!textures.empty ()) {
std::string textureName = textures.begin ()->second; std::string textureName = textures.begin ()->second;
if (textureName.find ("_rt_") == 0) { if (textureName.find ("_rt_") == 0 || textureName.find ("_alias_") == 0) {
this->m_texture = this->getScene ().findFBO (textureName); this->m_texture = this->getScene ().findFBO (textureName);
} else { } else {
// get the first texture on the first pass (this one represents the image assigned to this object) // get the first texture on the first pass (this one represents the image assigned to this object)

View File

@ -53,7 +53,6 @@ CPass::CPass (
m_fboProvider (std::move(fboProvider)), m_fboProvider (std::move(fboProvider)),
m_target (target) { m_target (target) {
this->setupShaders (); this->setupShaders ();
this->setupShaderVariables ();
} }
std::shared_ptr<const ITexture> CPass::resolveTexture (std::shared_ptr<const ITexture> expected, int index, std::shared_ptr<const ITexture> previous) { std::shared_ptr<const ITexture> CPass::resolveTexture (std::shared_ptr<const ITexture> expected, int index, std::shared_ptr<const ITexture> previous) {
@ -471,6 +470,8 @@ void CPass::setupShaders () {
glDeleteShader (vertexShaderID); glDeleteShader (vertexShaderID);
glDeleteShader (fragmentShaderID); glDeleteShader (fragmentShaderID);
// first setup the default values, these will be overwritten by future values
this->setupShaderVariables ();
// setup uniforms // setup uniforms
this->setupUniforms (); this->setupUniforms ();
// setup attributes too // setup attributes too