Merge pull request #1223 from Azaezel/detailNormalOrderOfOperations

DeferredBumpFeat order of operations corrections
This commit is contained in:
Luis Anton Rebollo 2015-03-08 22:49:27 +01:00
commit 825912e800
2 changed files with 6 additions and 6 deletions

View file

@ -225,10 +225,10 @@ void DeferredBumpFeatGLSL::processVert( Vector<ShaderComponent*> &componentLis
// We need the view to tangent space transform in the pixel shader. // 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 // Make sure there are texcoords
if( !fd.features[MFT_Parallax] && !fd.features[MFT_DiffuseMap] ) if( !fd.features[MFT_Parallax] && !fd.features[MFT_DiffuseMap] )
{ {
const bool useTexAnim = fd.features[MFT_TexAnim];
getOutTexCoord( "texCoord", getOutTexCoord( "texCoord",
"vec2", "vec2",
@ -236,12 +236,12 @@ void DeferredBumpFeatGLSL::processVert( Vector<ShaderComponent*> &componentLis
useTexAnim, useTexAnim,
meta, meta,
componentList ); componentList );
}
if ( fd.features.hasFeature( MFT_DetailNormalMap ) ) if ( fd.features.hasFeature( MFT_DetailNormalMap ) )
addOutDetailTexCoord( componentList, addOutDetailTexCoord( componentList,
meta, meta,
useTexAnim ); useTexAnim );
}
output = meta; output = meta;
} }

View file

@ -225,10 +225,10 @@ void DeferredBumpFeatHLSL::processVert( Vector<ShaderComponent*> &componentLis
// We need the view to tangent space transform in the pixel shader. // 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 // Make sure there are texcoords
if( !fd.features[MFT_Parallax] && !fd.features[MFT_DiffuseMap] ) if( !fd.features[MFT_Parallax] && !fd.features[MFT_DiffuseMap] )
{ {
const bool useTexAnim = fd.features[MFT_TexAnim];
getOutTexCoord( "texCoord", getOutTexCoord( "texCoord",
"float2", "float2",
@ -236,12 +236,12 @@ void DeferredBumpFeatHLSL::processVert( Vector<ShaderComponent*> &componentLis
useTexAnim, useTexAnim,
meta, meta,
componentList ); componentList );
}
if ( fd.features.hasFeature( MFT_DetailNormalMap ) ) if ( fd.features.hasFeature( MFT_DetailNormalMap ) )
addOutDetailTexCoord( componentList, addOutDetailTexCoord( componentList,
meta, meta,
useTexAnim ); useTexAnim );
}
output = meta; output = meta;
} }