Added ability to pass ints to post effect shader consts

Reorg'd probe init to flow better and be more robust on load
Cleaned up various parts of the probe render manager to be more stable
Fixed issue with crash on release due to numProbe in loops being 0
Updated glsl probe array shader
Beginning of rework of editor settings
Beginning of conversion of asset import config to similar system as editor settings
This commit is contained in:
Areloch 2019-06-13 00:37:12 -05:00
parent b40d33a663
commit dd3422b5a2
21 changed files with 300 additions and 420 deletions

View file

@ -89,7 +89,11 @@ ImplementEnumType(ReflectionModeEnum,
//-----------------------------------------------------------------------------
// Object setup and teardown
//-----------------------------------------------------------------------------
ReflectionProbe::ReflectionProbe()
ReflectionProbe::ReflectionProbe() :
cubeDescId(0),
reflectorDesc(nullptr),
mSphereVertCount(0),
mSpherePrimitiveCount(0)
{
// Flag this object so that it will always
// be sent across the network to clients
@ -247,11 +251,11 @@ bool ReflectionProbe::_setReflectionMode(void *object, const char *index, const
{
ReflectionProbe* probe = reinterpret_cast<ReflectionProbe*>(object);
if (data == "Static Cubemap")
if (!dStrcmp(data,"Static Cubemap"))
{
probe->mReflectionModeType = StaticCubemap;
}
else if (data == "Baked Cubemap")
else if (!dStrcmp(data, "Baked Cubemap"))
{
//Clear our cubemap if we changed it to be baked, just for cleanliness
probe->mReflectionModeType = BakedCubemap;
@ -589,6 +593,8 @@ void ReflectionProbe::processDynamicCubemap()
else
mProbeInfo->mIsEnabled = false;
mCubemapDirty = false;
//Update the probe manager with our new texture!
//if (!mProbeInfo->mIsSkylight && mProbeInfo->mPrefilterCubemap->isInitialized() && mProbeInfo->mIrradianceCubemap->isInitialized())
// PROBEMGR->updateProbeTexture(mProbeInfo->mProbeIdx);
@ -637,8 +643,10 @@ void ReflectionProbe::processBakedCubemap()
{
mProbeInfo->mIsEnabled = true;
mCubemapDirty = false;
//Update the probe manager with our new texture!
PROBEMGR->updateProbeTexture(mProbeInfo->mProbeIdx);
PROBEMGR->updateProbeTexture(mProbeInfo);
}
}
@ -728,8 +736,10 @@ void ReflectionProbe::processStaticCubemap()
{
mProbeInfo->mIsEnabled = true;
mCubemapDirty = false;
//Update the probe manager with our new texture!
PROBEMGR->updateProbeTexture(mProbeInfo->mProbeIdx);
PROBEMGR->updateProbeTexture(mProbeInfo);
}
}