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

@ -911,8 +911,8 @@ U32 TerrainMacroMapFeatGLSL::getOutputTargets( const MaterialFeatureData &fd ) c
void TerrainNormalMapFeatGLSL::processVert( Vector<ShaderComponent*> &componentList,
const MaterialFeatureData &fd )
{
// We only need to process normals during the prepass.
if ( !fd.features.hasFeature( MFT_PrePassConditioner ) )
// We only need to process normals during the deferred.
if ( !fd.features.hasFeature( MFT_DeferredConditioner ) )
return;
MultiLine *meta = new MultiLine;
@ -933,7 +933,7 @@ void TerrainNormalMapFeatGLSL::processPix( Vector<ShaderComponent*> &component
Var *viewToTangent = getInViewToTangent( componentList );
// This var is read from GBufferConditionerGLSL and
// used in the prepass output.
// used in the deferred output.
Var *gbNormal = (Var*)LangElement::find( "gbNormal" );
if ( !gbNormal )
{
@ -1004,8 +1004,8 @@ ShaderFeature::Resources TerrainNormalMapFeatGLSL::getResources( const MaterialF
{
Resources res;
// We only need to process normals during the prepass.
if ( fd.features.hasFeature( MFT_PrePassConditioner ) )
// We only need to process normals during the deferred.
if ( fd.features.hasFeature( MFT_DeferredConditioner ) )
{
// If this is the first normal map and there
// are no parallax features then we will

View file

@ -971,8 +971,8 @@ U32 TerrainMacroMapFeatHLSL::getOutputTargets( const MaterialFeatureData &fd ) c
void TerrainNormalMapFeatHLSL::processVert( Vector<ShaderComponent*> &componentList,
const MaterialFeatureData &fd )
{
// We only need to process normals during the prepass.
if ( !fd.features.hasFeature( MFT_PrePassConditioner ) )
// We only need to process normals during the deferred.
if ( !fd.features.hasFeature( MFT_DeferredConditioner ) )
return;
MultiLine *meta = new MultiLine;
@ -993,7 +993,7 @@ void TerrainNormalMapFeatHLSL::processPix( Vector<ShaderComponent*> &component
Var *viewToTangent = getInViewToTangent( componentList );
// This var is read from GBufferConditionerHLSL and
// used in the prepass output.
// used in the deferred output.
Var *gbNormal = (Var*)LangElement::find( "gbNormal" );
if ( !gbNormal )
{
@ -1090,8 +1090,8 @@ ShaderFeature::Resources TerrainNormalMapFeatHLSL::getResources( const MaterialF
{
Resources res;
// We only need to process normals during the prepass.
if ( fd.features.hasFeature( MFT_PrePassConditioner ) )
// We only need to process normals during the deferred.
if ( fd.features.hasFeature( MFT_DeferredConditioner ) )
{
// If this is the first normal map and there
// are no parallax features then we will

View file

@ -1062,7 +1062,7 @@ void TerrCell::preloadMaterials()
if ( GFX->getPixelShaderVersion() > 2.0f &&
dStrcmp( LIGHTMGR->getId(), "BLM" ) != 0)
material->getPrePassMat();
material->getDeferredMat();
}
for ( U32 i = 0; i < 4; i++ )

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);

View file

@ -153,8 +153,8 @@ protected:
NamedTexTargetRef mLightInfoTarget;
/// The prepass material for this material.
TerrainCellMaterial *mPrePassMat;
/// The deferred material for this material.
TerrainCellMaterial *mDeferredMat;
/// The reflection material for this material.
TerrainCellMaterial *mReflectMat;
@ -182,8 +182,8 @@ public:
bool reflectMat = false,
bool baseOnly = false );
/// Returns a prepass material from this material.
TerrainCellMaterial* getPrePassMat();
/// Returns a deferred material from this material.
TerrainCellMaterial* getDeferredMat();
/// Returns the reflection material from this material.
TerrainCellMaterial* getReflectMat();