mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Merge branch 'Preview4_0' of https://github.com/Azaezel/Torque3D into Preview4_0
This commit is contained in:
commit
a85bc7bae0
10 changed files with 107 additions and 85 deletions
|
|
@ -447,10 +447,6 @@ AdvancedLightBinManager::LightMaterialInfo* AdvancedLightBinManager::_getLightMa
|
|||
if ( smPSSMDebugRender )
|
||||
shadowMacros.push_back( GFXShaderMacro( "PSSM_DEBUG_RENDER" ) );
|
||||
|
||||
// If its a vector light see if we can enable SSAO.
|
||||
if ( lightType == LightInfo::Vector && smUseSSAOMask )
|
||||
shadowMacros.push_back( GFXShaderMacro( "USE_SSAO_MASK" ) );
|
||||
|
||||
// Now create the material info object.
|
||||
info = new LightMaterialInfo( lightMatName, smLightMatVertex[ lightType ], shadowMacros );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include "renderInstance/renderDeferredMgr.h"
|
||||
#include "math/mPolyhedron.impl.h"
|
||||
#include "gfx/gfxTransformSaver.h"
|
||||
|
||||
#include "lighting/advanced/advancedLightBinManager.h" //for ssao
|
||||
#include "gfx/gfxDebugEvent.h"
|
||||
#include "shaderGen/shaderGenVars.h"
|
||||
#include "materials/shaderData.h"
|
||||
|
|
@ -752,6 +752,24 @@ void RenderProbeMgr::render( SceneRenderState *state )
|
|||
mProbeArrayEffect->setShaderMacro("SKYLIGHT_ONLY", "1");
|
||||
else
|
||||
mProbeArrayEffect->setShaderMacro("SKYLIGHT_ONLY", "0");
|
||||
|
||||
//ssao mask
|
||||
if (AdvancedLightBinManager::smUseSSAOMask)
|
||||
{
|
||||
//find ssaoMask
|
||||
NamedTexTargetRef ssaoTarget = NamedTexTarget::find("ssaoMask");
|
||||
GFXTextureObject* pTexObj = ssaoTarget->getTexture();
|
||||
if (pTexObj)
|
||||
{
|
||||
mProbeArrayEffect->setShaderMacro("USE_SSAO_MASK");
|
||||
mProbeArrayEffect->setTexture(6, pTexObj);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mProbeArrayEffect->setTexture(6, NULL);
|
||||
}
|
||||
|
||||
mProbeArrayEffect->setTexture(3, mBRDFTexture);
|
||||
mProbeArrayEffect->setCubemapArrayTexture(4, mPrefilterArray);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue