Goes and replaces the references/names that use Prepass to be Deferred, since we're actually using deferred.

This commit is contained in:
Areloch 2017-04-11 00:23:14 -05:00
parent b052a1f970
commit af8fbf0e3a
122 changed files with 641 additions and 641 deletions

View file

@ -29,7 +29,7 @@
#include "materials/materialManager.h"
#include "terrain/terrFeatureTypes.h"
#include "terrain/terrMaterial.h"
#include "renderInstance/renderPrePassMgr.h"
#include "renderInstance/renderDeferredMgr.h"
#include "shaderGen/shaderGen.h"
#include "shaderGen/featureMgr.h"
#include "scene/sceneRenderState.h"
@ -71,7 +71,7 @@ const Vector<String> TerrainCellMaterial::mSamplerNames = _initSamplerNames();
TerrainCellMaterial::TerrainCellMaterial()
: mTerrain( NULL ),
mCurrPass( 0 ),
mPrePassMat( NULL ),
mDeferredMat( NULL ),
mReflectMat( NULL )
{
smAllMaterials.push_back( this );
@ -79,7 +79,7 @@ TerrainCellMaterial::TerrainCellMaterial()
TerrainCellMaterial::~TerrainCellMaterial()
{
SAFE_DELETE( mPrePassMat );
SAFE_DELETE( mDeferredMat );
SAFE_DELETE( mReflectMat );
smAllMaterials.remove( this );
}
@ -219,15 +219,15 @@ void TerrainCellMaterial::setTransformAndEye( const MatrixF &modelXfm,
}
}
TerrainCellMaterial* TerrainCellMaterial::getPrePassMat()
TerrainCellMaterial* TerrainCellMaterial::getDeferredMat()
{
if ( !mPrePassMat )
if ( !mDeferredMat )
{
mPrePassMat = new TerrainCellMaterial();
mPrePassMat->init( mTerrain, mMaterials, true, false, mMaterials == 0 );
mDeferredMat = new TerrainCellMaterial();
mDeferredMat->init( mTerrain, mMaterials, true, false, mMaterials == 0 );
}
return mPrePassMat;
return mDeferredMat;
}
TerrainCellMaterial* TerrainCellMaterial::getReflectMat()
@ -248,7 +248,7 @@ void TerrainCellMaterial::init( TerrainBlock *block,
bool baseOnly )
{
// This isn't allowed for now.
AssertFatal( !( prePassMat && reflectMat ), "TerrainCellMaterial::init - We shouldn't get prepass and reflection in the same material!" );
AssertFatal( !( prePassMat && reflectMat ), "TerrainCellMaterial::init - We shouldn't get deferred and reflection in the same material!" );
mTerrain = block;
mMaterials = activeMaterials;
@ -301,8 +301,8 @@ void TerrainCellMaterial::init( TerrainBlock *block,
for_each( materials.begin(), materials.end(), delete_pointer() );
// If we have attached mats then update them too.
if ( mPrePassMat )
mPrePassMat->init( mTerrain, mMaterials, true, false, baseOnly );
if ( mDeferredMat )
mDeferredMat->init( mTerrain, mMaterials, true, false, baseOnly );
if ( mReflectMat )
mReflectMat->init( mTerrain, mMaterials, false, true, baseOnly );
}
@ -341,14 +341,14 @@ bool TerrainCellMaterial::_createPass( Vector<MaterialInfo*> *materials,
const bool disableParallaxMaps = GFX->getPixelShaderVersion() < 3.0f ||
MATMGR->getExclusionFeatures().hasFeature( MFT_Parallax );
// Has advanced lightmap support been enabled for prepass.
// Has advanced lightmap support been enabled for deferred.
bool advancedLightmapSupport = false;
if ( prePassMat )
{
// This sucks... but it works.
AdvancedLightBinManager *lightBin;
if ( Sim::findObject( "AL_LightBinMgr", lightBin ) )
advancedLightmapSupport = lightBin->MRTLightmapsDuringPrePass();
advancedLightmapSupport = lightBin->MRTLightmapsDuringDeferred();
}
// Loop till we create a valid shader!
@ -360,7 +360,7 @@ bool TerrainCellMaterial::_createPass( Vector<MaterialInfo*> *materials,
if ( prePassMat )
{
features.addFeature( MFT_EyeSpaceDepthOut );
features.addFeature( MFT_PrePassConditioner );
features.addFeature( MFT_DeferredConditioner );
features.addFeature( MFT_DeferredTerrainBaseMap );
features.addFeature(MFT_isDeferred);
@ -546,7 +546,7 @@ bool TerrainCellMaterial::_createPass( Vector<MaterialInfo*> *materials,
{
desc.setBlend( true, GFXBlendSrcAlpha, GFXBlendInvSrcAlpha );
// If this is the prepass then we don't want to
// If this is the deferred then we don't want to
// write to the last two color channels (where
// depth is usually encoded).
//
@ -558,9 +558,9 @@ bool TerrainCellMaterial::_createPass( Vector<MaterialInfo*> *materials,
desc.setColorWrites( true, true, true, false );
}
// We write to the zbuffer if this is a prepass
// material or if the prepass is disabled.
desc.setZReadWrite( true, !MATMGR->getPrePassEnabled() ||
// We write to the zbuffer if this is a deferred
// material or if the deferred is disabled.
desc.setZReadWrite( true, !MATMGR->getDeferredEnabled() ||
prePassMat ||
reflectMat );
@ -669,10 +669,10 @@ bool TerrainCellMaterial::_createPass( Vector<MaterialInfo*> *materials,
materials->pop_front();
}
// If we're doing prepass it requires some
// If we're doing deferred it requires some
// special stencil settings for it to work.
if ( prePassMat )
desc.addDesc( RenderPrePassMgr::getOpaqueStenciWriteDesc( false ) );
desc.addDesc( RenderDeferredMgr::getOpaqueStenciWriteDesc( false ) );
desc.setCullMode( GFXCullCCW );
pass->stateBlock = GFX->createStateBlock(desc);