Skip to content

Commit

Permalink
allow forward shading pass on custom material.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lopuska committed Feb 13, 2016
1 parent 9c6128e commit 65238d3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Engine/source/renderInstance/renderMeshMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ void RenderMeshMgr::render(SceneRenderState * state)
if(!mElementList.size())
return;

// Check if bin is disabled in advanced lighting.
if ( MATMGR->getPrePassEnabled() && mBasicOnly )
return;

GFXDEBUGEVENT_SCOPE( RenderMeshMgr_Render, ColorI::GREEN );

// Automagically save & restore our viewport and transforms.
Expand Down Expand Up @@ -147,6 +143,14 @@ void RenderMeshMgr::render(SceneRenderState * state)
if( !mat )
mat = MATMGR->getWarningMatInstance();

// Check if bin is disabled in advanced lighting.
// Allow forward rendering pass on custom materials.

if ( ( MATMGR->getPrePassEnabled() && mBasicOnly && !mat->isCustomMaterial() ) )
{
j++;
continue;
}

U32 matListEnd = j;
lastMiscTex = sgData.miscTex;
Expand Down

0 comments on commit 65238d3

Please sign in to comment.