mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-26 10:03:48 +00:00
DeferredBumpFeat order of operations corrections. Clean.
This commit is contained in:
parent
0325aaf5bb
commit
ae3128b28b
2 changed files with 23 additions and 21 deletions
|
|
@ -216,39 +216,40 @@ void DeferredRTLightingFeatGLSL::setTexData( Material::StageData &stageDat,
|
|||
void DeferredBumpFeatGLSL::processVert( Vector<ShaderComponent*> &componentList,
|
||||
const MaterialFeatureData &fd )
|
||||
{
|
||||
if (fd.features[MFT_PrePassConditioner])
|
||||
if( fd.features[MFT_PrePassConditioner] )
|
||||
{
|
||||
// There is an output conditioner active, so we need to supply a transform
|
||||
// to the pixel shader.
|
||||
MultiLine *meta = new MultiLine;
|
||||
|
||||
// We need the view to tangent space transform in the pixel shader.
|
||||
getOutViewToTangent(componentList, meta, fd);
|
||||
getOutViewToTangent( componentList, meta, fd );
|
||||
|
||||
const bool useTexAnim = fd.features[MFT_TexAnim];
|
||||
// Make sure there are texcoords
|
||||
if (!fd.features[MFT_Parallax] && !fd.features[MFT_DiffuseMap])
|
||||
if( !fd.features[MFT_Parallax] && !fd.features[MFT_DiffuseMap] )
|
||||
{
|
||||
|
||||
getOutTexCoord("texCoord",
|
||||
"vec2",
|
||||
true,
|
||||
useTexAnim,
|
||||
meta,
|
||||
componentList);
|
||||
getOutTexCoord( "texCoord",
|
||||
"vec2",
|
||||
true,
|
||||
useTexAnim,
|
||||
meta,
|
||||
componentList );
|
||||
}
|
||||
if (fd.features.hasFeature(MFT_DetailNormalMap))
|
||||
addOutDetailTexCoord(componentList,
|
||||
meta,
|
||||
useTexAnim);
|
||||
|
||||
if ( fd.features.hasFeature( MFT_DetailNormalMap ) )
|
||||
addOutDetailTexCoord( componentList,
|
||||
meta,
|
||||
useTexAnim );
|
||||
|
||||
output = meta;
|
||||
}
|
||||
else if (fd.materialFeatures[MFT_NormalsOut] ||
|
||||
fd.features[MFT_ForwardShading] ||
|
||||
!fd.features[MFT_RTLighting])
|
||||
else if ( fd.materialFeatures[MFT_NormalsOut] ||
|
||||
fd.features[MFT_ForwardShading] ||
|
||||
!fd.features[MFT_RTLighting] )
|
||||
{
|
||||
Parent::processVert(componentList, fd);
|
||||
Parent::processVert( componentList, fd );
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ void DeferredBumpFeatHLSL::processVert( Vector<ShaderComponent*> &componentLis
|
|||
|
||||
// We need the view to tangent space transform in the pixel shader.
|
||||
getOutViewToTangent( componentList, meta, fd );
|
||||
|
||||
|
||||
const bool useTexAnim = fd.features[MFT_TexAnim];
|
||||
// Make sure there are texcoords
|
||||
if( !fd.features[MFT_Parallax] && !fd.features[MFT_DiffuseMap] )
|
||||
|
|
@ -237,10 +237,11 @@ void DeferredBumpFeatHLSL::processVert( Vector<ShaderComponent*> &componentLis
|
|||
meta,
|
||||
componentList );
|
||||
}
|
||||
|
||||
if ( fd.features.hasFeature( MFT_DetailNormalMap ) )
|
||||
addOutDetailTexCoord( componentList,
|
||||
meta,
|
||||
useTexAnim );
|
||||
addOutDetailTexCoord( componentList,
|
||||
meta,
|
||||
useTexAnim );
|
||||
|
||||
output = meta;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue