mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 05:50:31 +00:00
Merge pull request #1554 from Azaezel/MagicalSkyBox
from @rextimmy automatically adds a sky feature to skies. (render so…
This commit is contained in:
commit
25e8cf4711
5 changed files with 3 additions and 9 deletions
|
|
@ -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>());
|
||||
|
|
|
|||
|
|
@ -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 ),
|
||||
|
|
|
|||
|
|
@ -295,7 +295,6 @@ public:
|
|||
bool mDynamicCubemap;
|
||||
|
||||
// Deferred Shading
|
||||
bool mIsSky;
|
||||
F32 mMatInfoFlags[MAX_STAGES];
|
||||
bool mTranslucent;
|
||||
BlendOp mTranslucentBlendOp;
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue