mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
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:
parent
5122360552
commit
2b57bed899
3 changed files with 47 additions and 4 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue