level-wide accumulation assignment - overidden if an object's origin is in an accumulationVolume.

** do note changing the value does require nudging a mesh and/or a level reload to kick in at time of writing for visual feedback.
This commit is contained in:
Azaezel 2016-06-09 12:51:43 -05:00
parent 5122360552
commit 2b57bed899
3 changed files with 47 additions and 4 deletions

View file

@ -46,6 +46,8 @@
Vector< SimObjectPtr<SceneObject> > AccumulationVolume::smAccuObjects;
Vector< SimObjectPtr<AccumulationVolume> > AccumulationVolume::smAccuVolumes;
GFXTexHandle gLevelAccuMap;
//#define DEBUG_DRAW
IMPLEMENT_CO_NETOBJECT_V1( AccumulationVolume );
@ -295,7 +297,7 @@ void AccumulationVolume::refreshVolumes()
{
SimObjectPtr<SceneObject> object = smAccuObjects[n];
if ( object.isValid() )
object->mAccuTex = GFXTexHandle::ZERO;
object->mAccuTex = gLevelAccuMap;
}
//
@ -336,7 +338,7 @@ void AccumulationVolume::updateObject(SceneObject* object)
// We use ZERO instead of NULL so the accumulation
// texture will be updated in renderMeshMgr.
object->mAccuTex = GFXTexHandle::ZERO;
object->mAccuTex = gLevelAccuMap;
for (S32 i = 0; i < smAccuVolumes.size(); ++i)
{