mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Corrected the blending logic somewhat, added visualization modes for spec/diffuse probe influences, attenuation and contribution.
This commit is contained in:
parent
8d08ab2370
commit
b754c022ba
6 changed files with 271 additions and 81 deletions
|
|
@ -272,6 +272,8 @@ bool ReflectionProbe::onAdd()
|
|||
{
|
||||
createGeometry();
|
||||
updateProbeParams();
|
||||
|
||||
PROBEMGR->registerProbe(mProbeInfoIdx);
|
||||
}
|
||||
|
||||
setMaskBits(-1);
|
||||
|
|
@ -281,6 +283,10 @@ bool ReflectionProbe::onAdd()
|
|||
|
||||
void ReflectionProbe::onRemove()
|
||||
{
|
||||
if (isClientObject())
|
||||
{
|
||||
PROBEMGR->unregisterProbe(mProbeInfoIdx);
|
||||
}
|
||||
// Remove this object from the scene
|
||||
removeFromScene();
|
||||
|
||||
|
|
@ -441,7 +447,7 @@ void ReflectionProbe::unpackUpdate(NetConnection *conn, BitStream *stream)
|
|||
updateMaterial();
|
||||
}
|
||||
|
||||
//PROBEMGR->updateProbes();
|
||||
PROBEMGR->updateProbes();
|
||||
}
|
||||
|
||||
void ReflectionProbe::createGeometry()
|
||||
|
|
@ -597,6 +603,8 @@ void ReflectionProbe::updateMaterial()
|
|||
mProbeInfo->mIsEnabled = true;
|
||||
else
|
||||
mProbeInfo->mIsEnabled = false;
|
||||
|
||||
PROBEMGR->updateProbes();
|
||||
}
|
||||
|
||||
bool ReflectionProbe::createClientResources()
|
||||
|
|
@ -682,7 +690,7 @@ void ReflectionProbe::prepRenderImage(SceneRenderState *state)
|
|||
mProbeInfo->mScore *= mMax(mAbs(mDot(vect, state->getCameraTransform().getForwardVector())),0.001f);
|
||||
|
||||
//Register
|
||||
PROBEMGR->registerProbe(mProbeInfoIdx);
|
||||
//PROBEMGR->registerProbe(mProbeInfoIdx);
|
||||
|
||||
if (ReflectionProbe::smRenderPreviewProbes && gEditingMission && mEditorShapeInst && mPrefilterMap != nullptr)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue