mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-02 12:03:51 +00:00
Avoid negative heights in texture blending
This commit is contained in:
parent
10ed852dd2
commit
9cac064be8
2 changed files with 2 additions and 2 deletions
|
|
@ -1376,7 +1376,7 @@ void TerrainHeightMapBlendGLSL::processPix(Vector<ShaderComponent*>& componentLi
|
|||
detailH, blendDepth));
|
||||
}
|
||||
|
||||
meta->addStatement(new GenOp(" @ = (@ * 2.0f - 1.0f) * @;\r\n",
|
||||
meta->addStatement(new GenOp(" @ = max((@ * 2.0f - 1.0f) * @, 0.0f);\r\n",
|
||||
detailH, detailH, blendContrast));
|
||||
|
||||
meta->addStatement(new GenOp(" }\r\n"));
|
||||
|
|
|
|||
|
|
@ -1456,7 +1456,7 @@ void TerrainHeightMapBlendHLSL::processPix(Vector<ShaderComponent*>& componentLi
|
|||
detailH, blendDepth));
|
||||
}
|
||||
|
||||
meta->addStatement(new GenOp(" @ = (@ * 2.0f - 1.0f) * @;\r\n",
|
||||
meta->addStatement(new GenOp(" @ = max((@ * 2.0f - 1.0f) * @, 0.0f);\r\n",
|
||||
detailH, detailH, blendContrast));
|
||||
|
||||
meta->addStatement(new GenOp(" }\r\n"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue