Skip to content

Commit

Permalink
Fix setAlphaTestThreshold not always taking effect
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Aug 23, 2024
1 parent 77d3e2e commit fcd7031
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Components/Hlms/Common/include/OgreHlmsTextureBaseClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ namespace Ogre
const HlmsBlendblock *blendblock, const HlmsParamVec &params );
~OGRE_HLMS_TEXTURE_BASE_CLASS() override;

void setAlphaTestThreshold( float threshold ) override;

void preload() override;

void saveTextures( const String &folderPath, set<String>::type &savedTextures, bool saveOitd,
Expand Down
6 changes: 6 additions & 0 deletions Components/Hlms/Common/include/OgreHlmsTextureBaseClass.inl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fcd7031

Please sign in to comment.