mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Goes and replaces the references/names that use Prepass to be Deferred, since we're actually using deferred.
This commit is contained in:
parent
b052a1f970
commit
af8fbf0e3a
122 changed files with 641 additions and 641 deletions
|
|
@ -29,7 +29,7 @@
|
|||
#include "lighting/shadowMap/shadowMapPass.h"
|
||||
#include "lighting/shadowMap/lightShadowMap.h"
|
||||
#include "lighting/common/lightMapParams.h"
|
||||
#include "renderInstance/renderPrePassMgr.h"
|
||||
#include "renderInstance/renderDeferredMgr.h"
|
||||
#include "gfx/gfxTransformSaver.h"
|
||||
#include "scene/sceneManager.h"
|
||||
#include "scene/sceneRenderState.h"
|
||||
|
|
@ -130,7 +130,7 @@ AdvancedLightBinManager::AdvancedLightBinManager( AdvancedLightManager *lm /* =
|
|||
// We want a full-resolution buffer
|
||||
mTargetSizeType = RenderTexTargetBinManager::WindowSize;
|
||||
|
||||
mMRTLightmapsDuringPrePass = false;
|
||||
mMRTLightmapsDuringDeferred = false;
|
||||
|
||||
Con::NotifyDelegate callback( this, &AdvancedLightBinManager::_deleteLightMaterials );
|
||||
Con::addVariableNotify( "$pref::Shadows::filterMode", callback );
|
||||
|
|
@ -253,7 +253,7 @@ void AdvancedLightBinManager::render( SceneRenderState *state )
|
|||
return;
|
||||
|
||||
// Clear as long as there isn't MRT population of light buffer with lightmap data
|
||||
if ( !MRTLightmapsDuringPrePass() )
|
||||
if ( !MRTLightmapsDuringDeferred() )
|
||||
GFX->clear(GFXClearTarget, ColorI(0, 0, 0, 0), 1.0f, 0);
|
||||
|
||||
// Restore transforms
|
||||
|
|
@ -550,23 +550,23 @@ void AdvancedLightBinManager::setupSGData( SceneData &data, const SceneRenderSta
|
|||
}
|
||||
}
|
||||
|
||||
void AdvancedLightBinManager::MRTLightmapsDuringPrePass( bool val )
|
||||
void AdvancedLightBinManager::MRTLightmapsDuringDeferred( bool val )
|
||||
{
|
||||
// Do not enable if the GFX device can't do MRT's
|
||||
if ( GFX->getNumRenderTargets() < 2 )
|
||||
val = false;
|
||||
|
||||
if ( mMRTLightmapsDuringPrePass != val )
|
||||
if ( mMRTLightmapsDuringDeferred != val )
|
||||
{
|
||||
mMRTLightmapsDuringPrePass = val;
|
||||
mMRTLightmapsDuringDeferred = val;
|
||||
|
||||
// Reload materials to cause a feature recalculation on prepass materials
|
||||
// Reload materials to cause a feature recalculation on deferred materials
|
||||
if(mLightManager->isActive())
|
||||
MATMGR->flushAndReInitInstances();
|
||||
|
||||
RenderPrePassMgr *prepass;
|
||||
if ( Sim::findObject( "AL_PrePassBin", prepass ) && prepass->getTargetTexture( 0 ) )
|
||||
prepass->updateTargets();
|
||||
RenderDeferredMgr *deferred;
|
||||
if ( Sim::findObject( "AL_DeferredBin", deferred ) && deferred->getTargetTexture( 0 ) )
|
||||
deferred->updateTargets();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -834,21 +834,21 @@ bool LightMatInstance::init( const FeatureSet &features, const GFXVertexFormat *
|
|||
// in the same way.
|
||||
litState.separateAlphaBlendDefined = true;
|
||||
litState.separateAlphaBlendEnable = false;
|
||||
litState.stencilMask = RenderPrePassMgr::OpaqueDynamicLitMask | RenderPrePassMgr::OpaqueStaticLitMask;
|
||||
litState.stencilMask = RenderDeferredMgr::OpaqueDynamicLitMask | RenderDeferredMgr::OpaqueStaticLitMask;
|
||||
mLitState[DynamicLight] = GFX->createStateBlock(litState);
|
||||
|
||||
// StaticLightNonLMGeometry State: This will treat non-lightmapped geometry
|
||||
// in the usual way, but will not effect lightmapped geometry.
|
||||
litState.separateAlphaBlendDefined = true;
|
||||
litState.separateAlphaBlendEnable = false;
|
||||
litState.stencilMask = RenderPrePassMgr::OpaqueDynamicLitMask;
|
||||
litState.stencilMask = RenderDeferredMgr::OpaqueDynamicLitMask;
|
||||
mLitState[StaticLightNonLMGeometry] = GFX->createStateBlock(litState);
|
||||
|
||||
// StaticLightLMGeometry State: This will add specular information (alpha) but
|
||||
// multiply-darken color information.
|
||||
litState.blendDest = GFXBlendSrcColor;
|
||||
litState.blendSrc = GFXBlendZero;
|
||||
litState.stencilMask = RenderPrePassMgr::OpaqueStaticLitMask;
|
||||
litState.stencilMask = RenderDeferredMgr::OpaqueStaticLitMask;
|
||||
litState.separateAlphaBlendDefined = true;
|
||||
litState.separateAlphaBlendEnable = true;
|
||||
litState.separateAlphaBlendSrc = GFXBlendOne;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue