mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Merge branch 'AFXFIX3_FogFix' into Jeff_Faust_Fixes
This commit is contained in:
commit
0d19b14fbe
1 changed files with 7 additions and 2 deletions
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#include "materials/materialFeatureTypes.h"
|
#include "materials/materialFeatureTypes.h"
|
||||||
#include "materials/materialFeatureData.h"
|
#include "materials/materialFeatureData.h"
|
||||||
|
#include "terrain/terrFeatureTypes.h"
|
||||||
|
|
||||||
void EyeSpaceDepthOutHLSL::processVert( Vector<ShaderComponent*> &componentList,
|
void EyeSpaceDepthOutHLSL::processVert( Vector<ShaderComponent*> &componentList,
|
||||||
const MaterialFeatureData &fd )
|
const MaterialFeatureData &fd )
|
||||||
|
|
@ -85,7 +85,12 @@ void EyeSpaceDepthOutHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
||||||
LangElement *depthOutDecl = new DecOp( depthOut );
|
LangElement *depthOutDecl = new DecOp( depthOut );
|
||||||
|
|
||||||
meta->addStatement( new GenOp( "#ifndef CUBE_SHADOW_MAP\r\n" ) );
|
meta->addStatement( new GenOp( "#ifndef CUBE_SHADOW_MAP\r\n" ) );
|
||||||
meta->addStatement( new GenOp( " @ = dot(@, (@.xyz / @.w));\r\n", depthOutDecl, vEye, wsEyeVec, wsEyeVec ) );
|
|
||||||
|
if (fd.features.hasFeature(MFT_TerrainBaseMap))
|
||||||
|
meta->addStatement(new GenOp(" @ =min(0.9999, dot(@, (@.xyz / @.w)));\r\n", depthOutDecl, vEye, wsEyeVec, wsEyeVec));
|
||||||
|
else
|
||||||
|
meta->addStatement(new GenOp(" @ = dot(@, (@.xyz / @.w));\r\n", depthOutDecl, vEye, wsEyeVec, wsEyeVec));
|
||||||
|
|
||||||
meta->addStatement( new GenOp( "#else\r\n" ) );
|
meta->addStatement( new GenOp( "#else\r\n" ) );
|
||||||
|
|
||||||
Var *farDist = (Var*)Var::find( "oneOverFarplane" );
|
Var *farDist = (Var*)Var::find( "oneOverFarplane" );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue