mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
cleaned up variant of https://github.com/GarageGames/Torque3D/pull/768 alterations: opengl support, in-shader bug-reporting, direction vector fit to material slider-bar.
This commit is contained in:
parent
949251b988
commit
c6cdfafe4e
42 changed files with 2680 additions and 8 deletions
|
|
@ -164,6 +164,7 @@ void RenderBinManager::setupSGData( MeshRenderInst *ri, SceneData &data )
|
|||
data.cubemap = ri->cubemap;
|
||||
data.miscTex = ri->miscTex;
|
||||
data.reflectTex = ri->reflectTex;
|
||||
data.accuTex = ri->accuTex;
|
||||
data.lightmap = ri->lightmap;
|
||||
data.visibility = ri->visibility;
|
||||
data.materialHint = ri->materialHint;
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ void RenderMeshMgr::render(SceneRenderState * state)
|
|||
GFXCubemap *lastCubemap = NULL;
|
||||
GFXTextureObject *lastReflectTex = NULL;
|
||||
GFXTextureObject *lastMiscTex = NULL;
|
||||
GFXTextureObject *lastAccuTex = NULL;
|
||||
|
||||
SceneData sgData;
|
||||
sgData.init( state );
|
||||
|
|
@ -225,6 +226,15 @@ void RenderMeshMgr::render(SceneRenderState * state)
|
|||
dirty = true;
|
||||
}
|
||||
|
||||
// Update accumulation texture if it changed.
|
||||
// Note: accumulation texture can be NULL, and must be updated.
|
||||
if ( passRI->accuTex != lastAccuTex )
|
||||
{
|
||||
sgData.accuTex = passRI->accuTex;
|
||||
lastAccuTex = lastAccuTex;
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
if ( dirty )
|
||||
mat->setTextureStages( state, sgData );
|
||||
|
||||
|
|
|
|||
|
|
@ -366,6 +366,7 @@ struct MeshRenderInst : public RenderInst
|
|||
GFXTextureObject *backBuffTex;
|
||||
GFXTextureObject *reflectTex;
|
||||
GFXTextureObject *miscTex;
|
||||
GFXTextureObject *accuTex;
|
||||
GFXCubemap *cubemap;
|
||||
|
||||
void clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue