From fcd70310bcb68e36fba5b3703062c3bed1ae9b52 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Thu, 22 Aug 2024 21:15:44 -0300 Subject: [PATCH] Fix setAlphaTestThreshold not always taking effect --- Components/Hlms/Common/include/OgreHlmsTextureBaseClass.h | 2 ++ Components/Hlms/Common/include/OgreHlmsTextureBaseClass.inl | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/Components/Hlms/Common/include/OgreHlmsTextureBaseClass.h b/Components/Hlms/Common/include/OgreHlmsTextureBaseClass.h index 358987520df..8b346173040 100644 --- a/Components/Hlms/Common/include/OgreHlmsTextureBaseClass.h +++ b/Components/Hlms/Common/include/OgreHlmsTextureBaseClass.h @@ -105,6 +105,8 @@ namespace Ogre const HlmsBlendblock *blendblock, const HlmsParamVec ¶ms ); ~OGRE_HLMS_TEXTURE_BASE_CLASS() override; + void setAlphaTestThreshold( float threshold ) override; + void preload() override; void saveTextures( const String &folderPath, set::type &savedTextures, bool saveOitd, diff --git a/Components/Hlms/Common/include/OgreHlmsTextureBaseClass.inl b/Components/Hlms/Common/include/OgreHlmsTextureBaseClass.inl index a17195bcd6c..bb6ee2a9548 100644 --- a/Components/Hlms/Common/include/OgreHlmsTextureBaseClass.inl +++ b/Components/Hlms/Common/include/OgreHlmsTextureBaseClass.inl @@ -99,6 +99,12 @@ namespace Ogre datablockImpl->scheduleConstBufferUpdate( hasDirtyTextures, hasDirtySamplers ); } //----------------------------------------------------------------------------------- + void OGRE_HLMS_TEXTURE_BASE_CLASS::setAlphaTestThreshold( float threshold ) + { + HlmsDatablock::setAlphaTestThreshold( threshold ); + scheduleConstBufferUpdate(); + } + //----------------------------------------------------------------------------------- void OGRE_HLMS_TEXTURE_BASE_CLASS::preload() { loadAllTextures(); } //----------------------------------------------------------------------------------- void OGRE_HLMS_TEXTURE_BASE_CLASS::saveTextures( const String &folderPath,