emissive to recivesShadows

now we've got a glow mask and multiplier, ditch the emissive flag in favor of a proper recivesShadows
This commit is contained in:
AzaezelX 2022-12-29 13:38:30 -06:00
parent 54a2235128
commit 645f88d4af
20 changed files with 70 additions and 114 deletions

View file

@ -353,15 +353,10 @@ void ProcessedShaderMaterial::_determineFeatures( U32 stageNum,
if ( mMaterial->mAlphaTest )
fd.features.addFeature( MFT_AlphaTest );
if (mMaterial->mEmissive[stageNum])
{
fd.features.addFeature(MFT_IsEmissive);
}
else
if (mMaterial->isTranslucent())
{
fd.features.addFeature(MFT_RTLighting);
if (mMaterial->isTranslucent())
fd.features.addFeature(MFT_ReflectionProbes);
fd.features.addFeature(MFT_ReflectionProbes);
}
if ( mMaterial->mAnimFlags[stageNum] )
@ -1204,8 +1199,8 @@ void ProcessedShaderMaterial::_setShaderConstants(SceneRenderState * state, cons
// Deferred Shading: Determine Material Info Flags
S32 matInfoFlags =
(mMaterial->mEmissive[stageNum] ? 1 : 0) | //emissive
(mMaterial->mSubSurface[stageNum] ? 2 : 0); //subsurface
(mMaterial->mReceiveShadows[stageNum] ? 1 : 0) | //ReceiveShadows
(mMaterial->mSubSurface[stageNum] ? 1 << 2 : 0); //subsurface
mMaterial->mMatInfoFlags[stageNum] = matInfoFlags / 255.0f;
shaderConsts->setSafe(handles->mMatInfoFlagsSC, mMaterial->mMatInfoFlags[stageNum]);
if( handles->mAccuScaleSC->isValid() )