mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-19 19:35:26 +00:00
Merge pull request #719 from rextimmy/dxtnm-parallax-fix
Fix to allow parallax mapping with dxtnm textures via the red channel.
This commit is contained in:
commit
95ab3a33a5
5 changed files with 52 additions and 8 deletions
|
|
@ -347,8 +347,16 @@ void ParallaxFeatHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
Var *normalMap = getNormalMapTex();
|
||||
|
||||
// Call the library function to do the rest.
|
||||
meta->addStatement( new GenOp( " @.xy += parallaxOffset( @, @.xy, @, @ );\r\n",
|
||||
texCoord, normalMap, texCoord, negViewTS, parallaxInfo ) );
|
||||
if(fd.features.hasFeature( MFT_IsDXTnm, getProcessIndex() ))
|
||||
{
|
||||
meta->addStatement( new GenOp( " @.xy += parallaxOffsetDxtnm( @, @.xy, @, @ );\r\n",
|
||||
texCoord, normalMap, texCoord, negViewTS, parallaxInfo ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
meta->addStatement( new GenOp( " @.xy += parallaxOffset( @, @.xy, @, @ );\r\n",
|
||||
texCoord, normalMap, texCoord, negViewTS, parallaxInfo ) );
|
||||
}
|
||||
|
||||
// TODO: Fix second UV maybe?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue