mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-27 05:10:26 +00:00
Merge branch 'terrain' into 'master'
Discard terrain base layer alpha in non-shader rendering path (bug #6657) Closes #6657 See merge request OpenMW/openmw!2729
This commit is contained in:
commit
17cb06bb6c
2 changed files with 24 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
||||||
Bug #6427: Enemy health bar disappears before damaging effect ends
|
Bug #6427: Enemy health bar disappears before damaging effect ends
|
||||||
Bug #6550: Cloned body parts don't inherit texture effects
|
Bug #6550: Cloned body parts don't inherit texture effects
|
||||||
Bug #6645: Enemy block sounds align with animation instead of blocked hits
|
Bug #6645: Enemy block sounds align with animation instead of blocked hits
|
||||||
|
Bug #6657: Distant terrain tiles become black when using FWIW mod
|
||||||
Bug #6661: Saved games that have no preview screenshot cause issues or crashes
|
Bug #6661: Saved games that have no preview screenshot cause issues or crashes
|
||||||
Bug #6807: Ultimate Galleon is not working properly
|
Bug #6807: Ultimate Galleon is not working properly
|
||||||
Bug #6893: Lua: Inconsistent behavior with actors affected by Disable and SetDelete commands
|
Bug #6893: Lua: Inconsistent behavior with actors affected by Disable and SetDelete commands
|
||||||
|
|
|
@ -173,6 +173,27 @@ namespace
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class DiscardAlphaCombine
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static const osg::ref_ptr<osg::TexEnvCombine>& value()
|
||||||
|
{
|
||||||
|
static DiscardAlphaCombine instance;
|
||||||
|
return instance.mValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
osg::ref_ptr<osg::TexEnvCombine> mValue;
|
||||||
|
|
||||||
|
DiscardAlphaCombine()
|
||||||
|
: mValue(new osg::TexEnvCombine)
|
||||||
|
{
|
||||||
|
mValue->setCombine_Alpha(osg::TexEnvCombine::REPLACE);
|
||||||
|
mValue->setSource0_Alpha(osg::TexEnvCombine::CONSTANT);
|
||||||
|
mValue->setConstantColor(osg::Vec4(0.0, 0.0, 0.0, 1.0));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class UniformCollection
|
class UniformCollection
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -287,6 +308,8 @@ namespace Terrain
|
||||||
stateset->setTextureAttributeAndModes(
|
stateset->setTextureAttributeAndModes(
|
||||||
0, LayerTexMat::value(layerTileSize), osg::StateAttribute::ON);
|
0, LayerTexMat::value(layerTileSize), osg::StateAttribute::ON);
|
||||||
|
|
||||||
|
stateset->setTextureAttributeAndModes(0, DiscardAlphaCombine::value(), osg::StateAttribute::ON);
|
||||||
|
|
||||||
// Multiply by the alpha map
|
// Multiply by the alpha map
|
||||||
if (!blendmaps.empty())
|
if (!blendmaps.empty())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue