more conversionwork from specular entries to pbrconfig ones, adds backend glowmul and glowmap var tracking, as well as pbrconfigmap composite slip-in for the glowmap (sans shaderfeatures just yet). seems to have busted forward lit application though...

This commit is contained in:
AzaezelX 2019-10-22 15:11:39 -05:00
parent 7daf66cf9d
commit bfccfca0ce
21 changed files with 68 additions and 387 deletions

View file

@ -178,6 +178,9 @@ Material::Material()
mAOMapFilename[i].clear();
mMetalMapFilename[i].clear();
mMetalMapAsset[i] = StringTable->EmptyString();
mGlowMapFilename[i].clear();
mGlowMapAsset[i] = StringTable->EmptyString();
mGlowMul[i] = 0.0f;
}
dMemset(mCellIndex, 0, sizeof(mCellIndex));
@ -186,9 +189,6 @@ Material::Material()
dMemset(mNormalMapAtlas, 0, sizeof(mNormalMapAtlas));
dMemset(mUseAnisotropic, 0, sizeof(mUseAnisotropic));
// Deferred Shading : Metalness
dMemset(mUseMetalness, 0, sizeof(mUseMetalness));
mImposterLimits = Point4F::Zero;
mDoubleSided = false;
@ -277,6 +277,9 @@ void Material::initPersistFields()
addField("metalness", TypeF32, Offset(mMetalness, Material), MAX_STAGES,
"The degree of Metalness when not using a PBRConfigMap." );
addField("glowMul", TypeF32, Offset(mGlowMul, Material), MAX_STAGES,
"glow mask multiplier");
addProtectedField( "accuEnabled", TYPEID< bool >(), Offset( mAccuEnabled, Material ),
&_setAccuEnabled, &defaultProtectedGetFn, MAX_STAGES, "Accumulation texture." );
@ -320,6 +323,14 @@ void Material::initPersistFields()
addField("metalChan", TypeF32, Offset(mMetalChan, Material), MAX_STAGES,
"The input channel metalness maps use.");
addField("glowMap", TypeImageFilename, Offset(mGlowMapFilename, Material), MAX_STAGES,
"Metalness map. will be packed into the B channel of a packed 'specular' map");
addField("glowChan", TypeF32, Offset(mGlowChan, Material), MAX_STAGES,
"The input channel metalness maps use.");
addField("glowMul", TypeF32, Offset(mGlowMul, Material), MAX_STAGES,
"The input channel metalness maps use.");
addField("glow", TypeBool, Offset(mGlow, Material), MAX_STAGES,
"Enables rendering as glowing.");
addField( "parallaxScale", TypeF32, Offset(mParallaxScale, Material), MAX_STAGES,
"Enables parallax mapping and defines the scale factor for the parallax effect. Typically "
@ -346,9 +357,6 @@ void Material::initPersistFields()
addField("subSurfaceRolloff", TypeF32, Offset(mSubSurfaceRolloff, Material), MAX_STAGES,
"The 0 to 1 rolloff factor used in the subsurface scattering approximation." );
addField("glow", TypeBool, Offset(mGlow, Material), MAX_STAGES,
"Enables rendering this material to the glow buffer." );
addField("emissive", TypeBool, Offset(mEmissive, Material), MAX_STAGES,
"Enables emissive lighting for the material." );