mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-22 04:45:31 +00:00
Merge branch 'CustomShaderFeatures' of https://github.com/Areloch/Torque3D into development
This commit is contained in:
commit
741fcaed5a
37 changed files with 1365 additions and 38 deletions
|
|
@ -207,6 +207,8 @@ void TSMesh::innerRender( TSMaterialList *materials, const TSRenderState &rdata,
|
|||
|
||||
coreRI->materialHint = rdata.getMaterialHint();
|
||||
|
||||
coreRI->mCustomShaderData = rdata.getCustomShaderBinding();
|
||||
|
||||
coreRI->visibility = meshVisibility;
|
||||
coreRI->cubemap = rdata.getCubemap();
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ TSRenderState::TSRenderState( const TSRenderState &state )
|
|||
mLightQuery( state.mLightQuery ),
|
||||
mAccuTex( state.mAccuTex ),
|
||||
mNodeTransforms( state.mNodeTransforms ),
|
||||
mNodeTransformCount( state.mNodeTransformCount )
|
||||
mNodeTransformCount( state.mNodeTransformCount ),
|
||||
mCustomShaderData( state.mCustomShaderData )
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@
|
|||
#include "gfx/gfxDevice.h"
|
||||
#endif
|
||||
|
||||
#ifndef _BASEMATINSTANCE_H_
|
||||
#include "materials/baseMatInstance.h"
|
||||
#endif
|
||||
|
||||
class SceneRenderState;
|
||||
class GFXCubemap;
|
||||
class Frustum;
|
||||
|
|
@ -115,10 +119,10 @@ protected:
|
|||
/// Count of matrices in the mNodeTransforms list
|
||||
U32 mNodeTransformCount;
|
||||
|
||||
//Custom Shader data
|
||||
Vector<CustomShaderBindingData> mCustomShaderData;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
|
||||
TSRenderState();
|
||||
TSRenderState( const TSRenderState &state );
|
||||
|
||||
|
|
@ -165,6 +169,15 @@ public:
|
|||
void setAccuTex( GFXTextureObject* query ) { mAccuTex = query; }
|
||||
GFXTextureObject* getAccuTex() const { return mAccuTex; }
|
||||
|
||||
void addCustomShaderBinding(CustomShaderBindingData data)
|
||||
{
|
||||
mCustomShaderData.push_back(data);
|
||||
}
|
||||
Vector<CustomShaderBindingData> getCustomShaderBinding() const
|
||||
{
|
||||
return mCustomShaderData;
|
||||
}
|
||||
|
||||
///@ see mNodeTransforms, mNodeTransformCount
|
||||
void setNodeTransforms(MatrixF *list, U32 count) { mNodeTransforms = list; mNodeTransformCount = count; }
|
||||
void getNodeTransforms(MatrixF **list, U32 *count) const { *list = mNodeTransforms; *count = mNodeTransformCount; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue