|
@@ -1345,6 +1345,16 @@ void TerrainHeightMapBlendGLSL::processPix(Vector<ShaderComponent*>& componentLi
|
|
blendDepth->constSortPos = cspPrimitive;
|
|
blendDepth->constSortPos = cspPrimitive;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ Var* blendContrast = (Var*)LangElement::find(String::ToString("blendContrast%d", idx));
|
|
|
|
+ if (!blendContrast)
|
|
|
|
+ {
|
|
|
|
+ blendContrast = new Var;
|
|
|
|
+ blendContrast->setType("float");
|
|
|
|
+ blendContrast->setName(String::ToString("blendContrast%d", idx));
|
|
|
|
+ blendContrast->uniform = true;
|
|
|
|
+ blendContrast->constSortPos = cspPrimitive;
|
|
|
|
+ }
|
|
|
|
+
|
|
Var* detailH = (Var*)LangElement::find(String::ToString("detailH%d", idx));
|
|
Var* detailH = (Var*)LangElement::find(String::ToString("detailH%d", idx));
|
|
if (!detailH)
|
|
if (!detailH)
|
|
{
|
|
{
|
|
@@ -1365,6 +1375,10 @@ void TerrainHeightMapBlendGLSL::processPix(Vector<ShaderComponent*>& componentLi
|
|
meta->addStatement(new GenOp(" @ = clamp(0.5 + @, 0.0, 1.0);\r\n",
|
|
meta->addStatement(new GenOp(" @ = clamp(0.5 + @, 0.0, 1.0);\r\n",
|
|
detailH, blendDepth));
|
|
detailH, blendDepth));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ meta->addStatement(new GenOp(" @ = (@ * 2.0f - 1.0f) * @ + 0.5f;\r\n",
|
|
|
|
+ detailH, detailH, blendContrast));
|
|
|
|
+
|
|
meta->addStatement(new GenOp(" }\r\n"));
|
|
meta->addStatement(new GenOp(" }\r\n"));
|
|
}
|
|
}
|
|
}
|
|
}
|