mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
backend support for isSRGB and invSmooth flags, general cleanup HLSL side. left GLSL alone for sxs comparrison while we work out the kinks
This commit is contained in:
parent
f007700646
commit
29a8d5d36c
3 changed files with 26 additions and 17 deletions
|
|
@ -445,6 +445,8 @@ bool TerrainCellMaterial::_createPass( Vector<MaterialInfo*> *materials,
|
|||
features.addFeature(MFT_TerrainCompositeMap, featureIndex);
|
||||
features.removeFeature(MFT_DeferredTerrainBlankInfoMap);
|
||||
}
|
||||
if (mat->getInvertSmoothness())
|
||||
features.addFeature(MFT_InvertSmoothness);
|
||||
|
||||
pass->materials.push_back( (*materials)[i] );
|
||||
normalMaps.increment();
|
||||
|
|
@ -640,8 +642,12 @@ bool TerrainCellMaterial::_createPass( Vector<MaterialInfo*> *materials,
|
|||
matInfo->compositeTexConst = pass->shader->getShaderConstHandle(avar("$compositeMap%d", i));
|
||||
if (matInfo->compositeTexConst->isValid())
|
||||
{
|
||||
GFXTextureProfile* profile = &GFXStaticTextureProfile;
|
||||
if (matInfo->mat->getIsSRGB())
|
||||
profile = &GFXStaticTextureSRGBProfile;
|
||||
|
||||
matInfo->compositeTex.set(matInfo->mat->getCompositeMap(),
|
||||
&GFXStaticTextureProfile, "TerrainCellMaterial::_createPass() - CompositeMap");
|
||||
profile, "TerrainCellMaterial::_createPass() - CompositeMap");
|
||||
const S32 sampler = matInfo->compositeTexConst->getSamplerRegister();
|
||||
|
||||
desc.samplers[sampler] = GFXSamplerStateDesc::getWrapLinear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue