Merge pull request #1582 from Azaezel/SubSurf

Reimplements a form of subsurface scattering
This commit is contained in:
Areloch 2016-05-25 13:35:44 -05:00
commit ee6d9961e3
10 changed files with 95 additions and 19 deletions

View file

@ -1153,7 +1153,8 @@ void ProcessedShaderMaterial::_setShaderConstants(SceneRenderState * state, cons
// Deferred Shading: Determine Material Info Flags
S32 matInfoFlags =
(mMaterial->mEmissive[stageNum] ? 1 : 0);
(mMaterial->mEmissive[stageNum] ? 1 : 0) | //emissive
(mMaterial->mSubSurface[stageNum] ? 2 : 0); //subsurface
mMaterial->mMatInfoFlags[stageNum] = matInfoFlags / 255.0f;
shaderConsts->setSafe(handles->mMatInfoFlagsSC, mMaterial->mMatInfoFlags[stageNum]);
if( handles->mAccuScaleSC->isValid() )