Implementation of reflection and skylight probes.

Moves lighting math to the diffuse/specular two-channel logic.
This commit is contained in:
Areloch 2018-09-16 22:15:07 -05:00
parent 83dd55e851
commit 2be32ad737
102 changed files with 12346 additions and 1911 deletions

View file

@ -40,9 +40,10 @@
#include "gfx/gfxDebugEvent.h"
#include "math/util/matrixSet.h"
#include "console/consoleTypes.h"
#include "gfx/gfxTextureManager.h"
const RenderInstType AdvancedLightBinManager::RIT_LightInfo( "directLighting" );
const String AdvancedLightBinManager::smBufferName( "directLighting" );
const RenderInstType AdvancedLightBinManager::RIT_LightInfo( "specularLighting" );
const String AdvancedLightBinManager::smBufferName( "specularLighting" );
ShadowFilterMode AdvancedLightBinManager::smShadowFilterMode = ShadowFilterMode_SoftShadowHighQuality;
bool AdvancedLightBinManager::smPSSMDebugRender = false;
@ -180,6 +181,26 @@ bool AdvancedLightBinManager::setTargetSize(const Point2I &newTargetSize)
return ret;
}
bool AdvancedLightBinManager::_updateTargets()
{
PROFILE_SCOPE(AdvancedLightBinManager_updateTargets);
bool ret = Parent::_updateTargets();
mDiffuseLightingTarget = NamedTexTarget::find("diffuseLighting");
if (mDiffuseLightingTarget.isValid())
{
mDiffuseLightingTex = mDiffuseLightingTarget->getTexture();
for (U32 i = 0; i < mTargetChainLength; i++)
mTargetChain[i]->attachTexture(GFXTextureTarget::Color1, mDiffuseLightingTex);
}
GFX->finalizeReset();
return ret;
}
void AdvancedLightBinManager::addLight( LightInfo *light )
{
// Get the light type.