Fix split_stream wrong blending op
"immediate_draw" objects were assumed to be always blended but splitstream is additive.
This commit is contained in:
parent
8a2128fe7e
commit
7367342755
@ -142,6 +142,8 @@ void STKMeshSceneNode::updateNoGL()
|
||||
TransparentMaterial TranspMat = MaterialTypeToTransparentMaterial(type, MaterialTypeParam, material);
|
||||
if (!immediate_draw)
|
||||
TransparentMesh[TranspMat].push_back(&mesh);
|
||||
else
|
||||
additive = (TranspMat == TM_ADDITIVE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -370,7 +372,10 @@ void STKMeshSceneNode::render()
|
||||
{
|
||||
if (update_each_frame)
|
||||
updatevbo();
|
||||
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||
if (additive)
|
||||
glBlendFunc(GL_ONE, GL_ONE);
|
||||
else
|
||||
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
if (World::getWorld() && World::getWorld()->isFogEnabled())
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ protected:
|
||||
bool isMaterialInitialized;
|
||||
bool isGLInitialized;
|
||||
bool immediate_draw;
|
||||
bool additive;
|
||||
bool update_each_frame;
|
||||
bool isDisplacement;
|
||||
bool isGlow;
|
||||
|
Loading…
Reference in New Issue
Block a user