mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 20:05:33 +00:00
strip out unused pixspecular to cut down on sources of confusion
This commit is contained in:
parent
8d2d357948
commit
54cf07fa94
22 changed files with 12 additions and 534 deletions
|
|
@ -583,6 +583,7 @@ void MatInstance::dumpShaderInfo() const
|
|||
|
||||
Con::printf( "Material Info for object %s - %s", mMaterial->getName(), mMaterial->mMapTo.c_str() );
|
||||
|
||||
|
||||
if ( mProcessedMaterial == NULL )
|
||||
{
|
||||
Con::printf( " [no processed material!]" );
|
||||
|
|
|
|||
|
|
@ -120,8 +120,7 @@ Material::Material()
|
|||
mSmoothness[i] = 0.0f;
|
||||
mMetalness[i] = 0.0f;
|
||||
|
||||
mPixelSpecular[i] = false;
|
||||
mIsSRGb[i] = false;
|
||||
mIsSRGb[i] = false;
|
||||
mInvertSmoothness[i] = false;
|
||||
|
||||
mSmoothnessChan[i] = 0;
|
||||
|
|
|
|||
|
|
@ -237,9 +237,7 @@ public:
|
|||
|
||||
F32 mSmoothness[MAX_STAGES];
|
||||
F32 mMetalness[MAX_STAGES];
|
||||
|
||||
bool mPixelSpecular[MAX_STAGES];
|
||||
|
||||
|
||||
bool mVertLit[MAX_STAGES];
|
||||
|
||||
/// If true for a stage, vertex colors are multiplied
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ ImplementFeatureType( MFT_RTLighting, MFG_Lighting, 2.0f, true );
|
|||
ImplementFeatureType( MFT_LightMap, MFG_Lighting, 3.0f, true );
|
||||
ImplementFeatureType( MFT_ToneMap, MFG_Lighting, 4.0f, true );
|
||||
ImplementFeatureType( MFT_VertLitTone, MFG_Lighting, 5.0f, false );
|
||||
ImplementFeatureType( MFT_PixSpecular, MFG_Lighting, 6.0f, true );
|
||||
ImplementFeatureType( MFT_StaticCubemap, U32(-1), -1.0, true );
|
||||
ImplementFeatureType( MFT_CubeMap, MFG_Lighting, 7.0f, true );
|
||||
ImplementFeatureType( MFT_SubSurface, MFG_Lighting, 8.0f, true );
|
||||
|
|
|
|||
|
|
@ -124,7 +124,6 @@ DeclareFeatureType( MFT_VertLitTone );
|
|||
|
||||
DeclareFeatureType( MFT_StaticCubemap );
|
||||
DeclareFeatureType( MFT_CubeMap );
|
||||
DeclareFeatureType( MFT_PixSpecular );
|
||||
DeclareFeatureType( MFT_InvertSmoothness );
|
||||
DeclareFeatureType( MFT_SpecularMap );
|
||||
DeclareFeatureType( MFT_GlossMap );
|
||||
|
|
|
|||
|
|
@ -84,8 +84,6 @@ MaterialManager::MaterialManager()
|
|||
Con::NotifyDelegate callabck2( this, &MaterialManager::_onDisableMaterialFeature );
|
||||
Con::setVariable( "$pref::Video::disableNormalMapping", "false" );
|
||||
Con::addVariableNotify( "$pref::Video::disableNormalMapping", callabck2 );
|
||||
Con::setVariable( "$pref::Video::disablePixSpecular", "false" );
|
||||
Con::addVariableNotify( "$pref::Video::disablePixSpecular", callabck2 );
|
||||
Con::setVariable( "$pref::Video::disableCubemapping", "false" );
|
||||
Con::addVariableNotify( "$pref::Video::disableCubemapping", callabck2 );
|
||||
Con::setVariable( "$pref::Video::disableParallaxMapping", "false" );
|
||||
|
|
@ -417,12 +415,6 @@ void MaterialManager::recalcFeaturesFromPrefs()
|
|||
mExclusionFeatures.setFeature( MFT_NormalMap,
|
||||
Con::getBoolVariable( "$pref::Video::disableNormalMapping", false ) );
|
||||
|
||||
mExclusionFeatures.setFeature( MFT_SpecularMap,
|
||||
Con::getBoolVariable( "$pref::Video::disablePixSpecular", false ) );
|
||||
|
||||
mExclusionFeatures.setFeature( MFT_PixSpecular,
|
||||
Con::getBoolVariable( "$pref::Video::disablePixSpecular", false ) );
|
||||
|
||||
mExclusionFeatures.setFeature( MFT_CubeMap,
|
||||
Con::getBoolVariable( "$pref::Video::disableCubemapping", false ) );
|
||||
|
||||
|
|
|
|||
|
|
@ -136,11 +136,7 @@ U32 ProcessedFFMaterial::getNumStages()
|
|||
// stage is active.
|
||||
if ( mStages[i].hasValidTex() )
|
||||
stageActive = true;
|
||||
|
||||
// If this stage has specular lighting, it's active
|
||||
if ( mMaterial->mPixelSpecular[i] )
|
||||
stageActive = true;
|
||||
|
||||
|
||||
// If we have a Material that is vertex lit
|
||||
// then it may not have a texture
|
||||
if( mMaterial->mVertLit[i] )
|
||||
|
|
|
|||
|
|
@ -267,11 +267,7 @@ U32 ProcessedShaderMaterial::getNumStages()
|
|||
// stage is active.
|
||||
if ( mStages[i].hasValidTex() )
|
||||
stageActive = true;
|
||||
|
||||
// If this stage has specular lighting, it's active
|
||||
if ( mMaterial->mPixelSpecular[i] )
|
||||
stageActive = true;
|
||||
|
||||
|
||||
// If this stage has diffuse color, it's active
|
||||
if ( mMaterial->mDiffuse[i].alpha > 0 &&
|
||||
mMaterial->mDiffuse[i] != LinearColorF::WHITE )
|
||||
|
|
@ -424,12 +420,6 @@ void ProcessedShaderMaterial::_determineFeatures( U32 stageNum,
|
|||
if ( mMaterial->mParallaxScale[stageNum] > 0.0f &&
|
||||
fd.features[ MFT_NormalMap ] )
|
||||
fd.features.addFeature( MFT_Parallax );
|
||||
|
||||
// If not parallax then allow per-pixel specular if
|
||||
// we have real time lighting enabled.
|
||||
else if ( fd.features[MFT_RTLighting] &&
|
||||
mMaterial->mPixelSpecular[stageNum] )
|
||||
fd.features.addFeature( MFT_PixSpecular );
|
||||
}
|
||||
|
||||
// Without realtime lighting and on lower end
|
||||
|
|
@ -441,8 +431,6 @@ void ProcessedShaderMaterial::_determineFeatures( U32 stageNum,
|
|||
// have per-pixel specular enabled.
|
||||
if( fd.features[ MFT_SpecularMap ] )
|
||||
{
|
||||
fd.features.addFeature( MFT_PixSpecular );
|
||||
|
||||
// Check for an alpha channel on the specular map. If it has one (and it
|
||||
// has values less than 255) than the artist has put the gloss map into
|
||||
// the alpha channel.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue