mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Merge branch 'development' of https://github.com/TorqueGameEngines/Torque3D into Enumnanigans
This commit is contained in:
commit
72c67e196a
394 changed files with 49666 additions and 46898 deletions
|
|
@ -56,6 +56,7 @@ ImplementFeatureType( MFT_AccuMap, MFG_PreLighting, 2.0f, true );
|
|||
ImplementFeatureType(MFT_ReflectionProbes, MFG_Lighting, 1.0f, true);
|
||||
ImplementFeatureType( MFT_RTLighting, MFG_Lighting, 2.0f, true );
|
||||
ImplementFeatureType( MFT_GlowMap, MFG_Lighting, 3.0f, true );
|
||||
ImplementFeatureType( MFT_GlowMask, MFG_Lighting, 3.1f, true );
|
||||
ImplementFeatureType( MFT_LightMap, MFG_Lighting, 4.0f, true );
|
||||
ImplementFeatureType( MFT_ToneMap, MFG_Lighting, 5.0f, true );
|
||||
ImplementFeatureType( MFT_VertLitTone, MFG_Lighting, 6.0f, false );
|
||||
|
|
@ -65,8 +66,6 @@ ImplementFeatureType( MFT_SubSurface, MFG_Lighting, 8.0f, true );
|
|||
ImplementFeatureType( MFT_VertLit, MFG_Lighting, 9.0f, true );
|
||||
ImplementFeatureType( MFT_MinnaertShading, MFG_Lighting, 10.0f, true );
|
||||
|
||||
|
||||
ImplementFeatureType( MFT_GlowMask, MFG_PostLighting, 1.0f, true );
|
||||
ImplementFeatureType( MFT_Visibility, MFG_PostLighting, 2.0f, true );
|
||||
ImplementFeatureType( MFT_Fog, MFG_PostProcess, 3.0f, true );
|
||||
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ void ProcessedMaterial::addStateBlockDesc(const GFXStateBlockDesc& sb)
|
|||
mUserDefined = sb;
|
||||
}
|
||||
|
||||
void ProcessedMaterial::_initStateBlockTemplates(GFXStateBlockDesc& stateTranslucent, GFXStateBlockDesc& stateGlow, GFXStateBlockDesc& stateReflect)
|
||||
void ProcessedMaterial::_initStateBlockTemplates(GFXStateBlockDesc& stateTranslucent, GFXStateBlockDesc& stateReflect)
|
||||
{
|
||||
// Translucency
|
||||
stateTranslucent.blendDefined = true;
|
||||
|
|
@ -211,10 +211,6 @@ void ProcessedMaterial::_initStateBlockTemplates(GFXStateBlockDesc& stateTranslu
|
|||
stateTranslucent.alphaTestFunc = GFXCmpGreaterEqual;
|
||||
stateTranslucent.samplersDefined = true;
|
||||
|
||||
// Glow
|
||||
stateGlow.zDefined = true;
|
||||
stateGlow.zWriteEnable = false;
|
||||
|
||||
// Reflect
|
||||
stateReflect.cullDefined = true;
|
||||
stateReflect.cullMode = mMaterial->mDoubleSided ? GFXCullNone : GFXCullCW;
|
||||
|
|
@ -316,11 +312,10 @@ void ProcessedMaterial::_initPassStateBlock( RenderPassData *rpd, GFXStateBlockD
|
|||
void ProcessedMaterial::_initRenderStateStateBlocks( RenderPassData *rpd )
|
||||
{
|
||||
GFXStateBlockDesc stateTranslucent;
|
||||
GFXStateBlockDesc stateGlow;
|
||||
GFXStateBlockDesc stateReflect;
|
||||
GFXStateBlockDesc statePass;
|
||||
|
||||
_initStateBlockTemplates( stateTranslucent, stateGlow, stateReflect );
|
||||
_initStateBlockTemplates( stateTranslucent, stateReflect );
|
||||
_initPassStateBlock( rpd, statePass );
|
||||
|
||||
// Ok, we've got our templates set up, let's combine them together based on state and
|
||||
|
|
@ -333,8 +328,6 @@ void ProcessedMaterial::_initRenderStateStateBlocks( RenderPassData *rpd )
|
|||
stateFinal.addDesc(stateReflect);
|
||||
if (i & RenderPassData::STATE_TRANSLUCENT)
|
||||
stateFinal.addDesc(stateTranslucent);
|
||||
if (i & RenderPassData::STATE_GLOW)
|
||||
stateFinal.addDesc(stateGlow);
|
||||
|
||||
stateFinal.addDesc(statePass);
|
||||
|
||||
|
|
@ -359,9 +352,6 @@ U32 ProcessedMaterial::_getRenderStateIndex( const SceneRenderState *sceneState,
|
|||
// For example sgData.visibility would be bad to use
|
||||
// in here without changing how RenderMeshMgr works.
|
||||
|
||||
if ( sgData.binType == SceneData::GlowBin )
|
||||
currState |= RenderPassData::STATE_GLOW;
|
||||
|
||||
if ( sceneState && sceneState->isReflectPass() )
|
||||
currState |= RenderPassData::STATE_REFLECT;
|
||||
|
||||
|
|
|
|||
|
|
@ -98,9 +98,8 @@ public:
|
|||
{
|
||||
STATE_REFLECT = 1,
|
||||
STATE_TRANSLUCENT = 2,
|
||||
STATE_GLOW = 4,
|
||||
STATE_WIREFRAME = 8,
|
||||
STATE_MAX = 16
|
||||
STATE_WIREFRAME = 4,
|
||||
STATE_MAX = 8
|
||||
};
|
||||
|
||||
///
|
||||
|
|
@ -301,7 +300,7 @@ protected:
|
|||
/// @{
|
||||
|
||||
/// Creates the default state block templates, used by initStateBlocks.
|
||||
virtual void _initStateBlockTemplates(GFXStateBlockDesc& stateTranslucent, GFXStateBlockDesc& stateGlow, GFXStateBlockDesc& stateReflect);
|
||||
virtual void _initStateBlockTemplates(GFXStateBlockDesc& stateTranslucent, GFXStateBlockDesc& stateReflect);
|
||||
|
||||
/// Does the base render state block setting, normally per pass.
|
||||
virtual void _initPassStateBlock( RenderPassData *rpd, GFXStateBlockDesc& result);
|
||||
|
|
|
|||
|
|
@ -348,7 +348,6 @@ void ProcessedShaderMaterial::_determineFeatures( U32 stageNum,
|
|||
//
|
||||
if ( features.hasFeature( MFT_UseInstancing ) &&
|
||||
mMaxStages == 1 &&
|
||||
!mMaterial->mGlow[0] &&
|
||||
shaderVersion >= 3.0f )
|
||||
fd.features.addFeature( MFT_UseInstancing );
|
||||
|
||||
|
|
@ -520,6 +519,9 @@ void ProcessedShaderMaterial::_determineFeatures( U32 stageNum,
|
|||
if ( mMaterial->mVertColor[ stageNum ] &&
|
||||
mVertexFormat->hasColor() )
|
||||
fd.features.addFeature( MFT_DiffuseVertColor );
|
||||
|
||||
if (mMaterial->mGlow[stageNum])
|
||||
fd.features.addFeature(MFT_GlowMask);
|
||||
|
||||
// Allow features to add themselves.
|
||||
for ( U32 i = 0; i < FEATUREMGR->getFeatureCount(); i++ )
|
||||
|
|
|
|||
|
|
@ -45,10 +45,6 @@ struct SceneData
|
|||
/// the special bins we care about.
|
||||
RegularBin = 0,
|
||||
|
||||
/// The glow render bin.
|
||||
/// @see RenderGlowMgr
|
||||
GlowBin,
|
||||
|
||||
/// The deferred render bin.
|
||||
/// @RenderDeferredMgr
|
||||
DeferredBin,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue