mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Added Forward Material debug viz for HLSL(so far) and integrated it back into editor flagging.
Re-added logic to track existing probe shader consts instead of constantly recreating it Added logic for pre multiplied translucency mode
This commit is contained in:
parent
c74b669f5e
commit
72ceede272
16 changed files with 424 additions and 30 deletions
|
|
@ -85,7 +85,8 @@ ImplementEnumType( MaterialBlendOp,
|
|||
{ Material::Add, "Add", "Adds the color of the material to the frame buffer with full alpha for each pixel." },
|
||||
{ Material::AddAlpha, "AddAlpha", "The color is modulated by the alpha channel before being added to the frame buffer." },
|
||||
{ Material::Sub, "Sub", "Subtractive Blending. Reverses the color model, causing dark colors to have a stronger visual effect." },
|
||||
{ Material::LerpAlpha, "LerpAlpha", "Linearly interpolates between Material color and frame buffer color based on alpha." }
|
||||
{ Material::LerpAlpha, "LerpAlpha", "Linearly interpolates between Material color and frame buffer color based on alpha." },
|
||||
{ Material::PreMult, "PreMult", "" }
|
||||
EndImplementEnumType;
|
||||
|
||||
ImplementEnumType( MaterialWaveType,
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ public:
|
|||
Sub,
|
||||
LerpAlpha, // linear interpolation modulated with alpha channel
|
||||
ToneMap,
|
||||
PreMult,
|
||||
NumBlendTypes
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ ImplementFeatureType( MFT_GlowMask, MFG_PostLighting, 1.0f, true );
|
|||
ImplementFeatureType( MFT_Visibility, MFG_PostLighting, 2.0f, true );
|
||||
ImplementFeatureType( MFT_Fog, MFG_PostProcess, 3.0f, true );
|
||||
|
||||
ImplementFeatureType(MFT_DebugViz, MFG_PostProcess, 998.0f, true);
|
||||
|
||||
ImplementFeatureType( MFT_HDROut, MFG_PostProcess, 999.0f, true );
|
||||
|
||||
ImplementFeatureType( MFT_IsBC3nm, U32(-1), -1, true );
|
||||
|
|
|
|||
|
|
@ -153,6 +153,8 @@ DeclareFeatureType( MFT_Fog );
|
|||
/// dynamic range color into the correct HDR encoded format.
|
||||
DeclareFeatureType( MFT_HDROut );
|
||||
|
||||
DeclareFeatureType( MFT_DebugViz );
|
||||
|
||||
///
|
||||
DeclareFeatureType( MFT_DeferredConditioner );
|
||||
DeclareFeatureType( MFT_InterlacedDeferred );
|
||||
|
|
|
|||
|
|
@ -142,6 +142,13 @@ void ProcessedMaterial::_setBlendState(Material::BlendOp blendOp, GFXStateBlockD
|
|||
break;
|
||||
}
|
||||
|
||||
case Material::PreMult:
|
||||
{
|
||||
desc.blendSrc = GFXBlendOne;
|
||||
desc.blendDest = GFXBlendInvSrcAlpha;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
// default to LerpAlpha
|
||||
|
|
|
|||
|
|
@ -415,6 +415,11 @@ void ProcessedShaderMaterial::_determineFeatures( U32 stageNum,
|
|||
fd.features.addFeature( MFT_NormalMapAtlas );
|
||||
}
|
||||
|
||||
if (!fd.features.hasFeature(MFT_ForwardShading))
|
||||
{
|
||||
fd.features.removeFeature(MFT_DebugViz);
|
||||
}
|
||||
|
||||
// Grab other features like normal maps, base texture, etc.
|
||||
FeatureSet mergeFeatures;
|
||||
mStages[stageNum].getFeatureSet( &mergeFeatures );
|
||||
|
|
@ -513,6 +518,8 @@ void ProcessedShaderMaterial::_determineFeatures( U32 stageNum,
|
|||
//
|
||||
fd.features.addFeature( MFT_HDROut );
|
||||
|
||||
fd.features.addFeature(MFT_DebugViz);
|
||||
|
||||
// If vertex color is enabled on the material's stage and
|
||||
// color is present in vertex format, add diffuse vertex
|
||||
// color feature.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue