RenderMeshExample won't render transparent materials properly, this commit will fix it.

This commit is contained in:
Taras Podoroga 2013-08-21 23:57:55 +03:00
parent 0b6b7f73c5
commit b0974e6647

View file

@ -284,6 +284,13 @@ void RenderMeshExample::prepRenderImage( SceneRenderState *state )
// Set our RenderInst as a standard mesh render
ri->type = RenderPassManager::RIT_Mesh;
//If our material has transparency set on this will redirect it to proper render bin
if ( matInst->getMaterial()->isTranslucent() )
{
ri->type = RenderPassManager::RIT_Translucent;
ri->translucentSort = true;
}
// Calculate our sorting point
if ( state )
{