Merge pull request #1554 from Azaezel/MagicalSkyBox

from @rextimmy automatically adds a sky feature to  skies. (render so…
This commit is contained in:
Anis 2016-03-22 12:59:09 +01:00
commit 25e8cf4711
5 changed files with 3 additions and 9 deletions

View file

@ -608,6 +608,7 @@ void SkyBox::_initMaterial()
FeatureSet features = MATMGR->getDefaultFeatures();
features.removeFeature( MFT_RTLighting );
features.removeFeature( MFT_Visibility );
features.addFeature(MFT_SkyBox);
// Now initialize the material.
mMatInstance->init(features, getGFXVertexFormat<GFXVertexPNT>());

View file

@ -210,9 +210,6 @@ Material::Material()
mDirectSoundOcclusion = 1.f;
mReverbSoundOcclusion = 1.0;
// Deferred Shading
mIsSky = false;
}
void Material::initPersistFields()
@ -420,9 +417,6 @@ void Material::initPersistFields()
addField("dynamicCubemap", TypeBool, Offset(mDynamicCubemap, Material),
"Enables the material to use the dynamic cubemap from the ShapeBase object its applied to." );
addField("isSky", TypeBool, Offset(mIsSky, Material),
"Sky support. Alters draw dimensions." );
addGroup( "Behavioral" );
addField( "showFootprints", TypeBool, Offset( mShowFootprints, Material ),

View file

@ -295,7 +295,6 @@ public:
bool mDynamicCubemap;
// Deferred Shading
bool mIsSky;
F32 mMatInfoFlags[MAX_STAGES];
bool mTranslucent;
BlendOp mTranslucentBlendOp;

View file

@ -97,7 +97,7 @@ ImplementFeatureType( MFT_ImposterVert, MFG_PreTransform, 1.0, false );
// Deferred Shading
ImplementFeatureType( MFT_isDeferred, U32(-1), -1, true );
ImplementFeatureType( MFT_SkyBox, MFG_Transform, 1.0f, true );
ImplementFeatureType( MFT_SkyBox, MFG_Transform, 1.0f, false );
ImplementFeatureType( MFT_DeferredEmptySpec, MFG_Texture, 8.01f, false );
ImplementFeatureType( MFT_DeferredSpecMap, MFG_Texture, 8.2f, false );

View file

@ -341,7 +341,7 @@ void ProcessedShaderMaterial::_determineFeatures( U32 stageNum,
fd.features.addFeature( MFT_CubeMap );
}
if (mMaterial->mIsSky)
if (features.hasFeature(MFT_SkyBox))
{
fd.features.addFeature(MFT_CubeMap);
fd.features.addFeature(MFT_SkyBox);