|
@@ -615,9 +615,14 @@ void TerrainDetailMapFeatGLSL::processPix( Vector<ShaderComponent*> &component
|
|
meta->addStatement( new GenOp( " @ *= @.y * @.w;\r\n",
|
|
meta->addStatement( new GenOp( " @ *= @.y * @.w;\r\n",
|
|
detailColor, detailInfo, inDet ) );
|
|
detailColor, detailInfo, inDet ) );
|
|
|
|
|
|
- meta->addStatement( new GenOp( " @ += @ * @;\r\n",
|
|
|
|
|
|
+
|
|
|
|
+ meta->addStatement(new GenOp(" @.rgb = toGamma(@.rgb);\r\n", outColor, outColor));
|
|
|
|
+
|
|
|
|
+ meta->addStatement(new GenOp(" @ += @ * @;\r\n",
|
|
outColor, detailColor, detailBlend));
|
|
outColor, detailColor, detailBlend));
|
|
|
|
|
|
|
|
+ meta->addStatement(new GenOp(" @.rgb = toLinear(clamp(@.rgb, 0, 1));\r\n", outColor, outColor));
|
|
|
|
+
|
|
meta->addStatement( new GenOp( " }\r\n" ) );
|
|
meta->addStatement( new GenOp( " }\r\n" ) );
|
|
|
|
|
|
output = meta;
|
|
output = meta;
|
|
@@ -867,9 +872,13 @@ void TerrainMacroMapFeatGLSL::processPix( Vector<ShaderComponent*> &componentL
|
|
|
|
|
|
Var *outColor = (Var*)LangElement::find( getOutputTargetVarName(target) );
|
|
Var *outColor = (Var*)LangElement::find( getOutputTargetVarName(target) );
|
|
|
|
|
|
|
|
+ meta->addStatement(new GenOp(" @.rgb = toGamma(@.rgb);\r\n", outColor, outColor));
|
|
|
|
+
|
|
meta->addStatement(new GenOp(" @ += @ * @;\r\n",
|
|
meta->addStatement(new GenOp(" @ += @ * @;\r\n",
|
|
outColor, detailColor, detailBlend));
|
|
outColor, detailColor, detailBlend));
|
|
|
|
|
|
|
|
+ meta->addStatement(new GenOp(" @.rgb = toLinear(clamp(@.rgb, 0, 1));\r\n", outColor, outColor));
|
|
|
|
+
|
|
meta->addStatement( new GenOp( " }\r\n" ) );
|
|
meta->addStatement( new GenOp( " }\r\n" ) );
|
|
|
|
|
|
output = meta;
|
|
output = meta;
|