mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Fix for terrain detail color blending post-linearization
This commit is contained in:
parent
3d7c1bbbf7
commit
f3fc5b1fc0
|
|
@ -615,9 +615,14 @@ void TerrainDetailMapFeatGLSL::processPix( Vector<ShaderComponent*> &component
|
|||
meta->addStatement( new GenOp( " @ *= @.y * @.w;\r\n",
|
||||
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));
|
||||
|
||||
meta->addStatement(new GenOp(" @.rgb = toLinear(clamp(@.rgb, 0, 1));\r\n", outColor, outColor));
|
||||
|
||||
meta->addStatement( new GenOp( " }\r\n" ) );
|
||||
|
||||
output = meta;
|
||||
|
|
@ -867,9 +872,13 @@ void TerrainMacroMapFeatGLSL::processPix( Vector<ShaderComponent*> &componentL
|
|||
|
||||
Var *outColor = (Var*)LangElement::find( getOutputTargetVarName(target) );
|
||||
|
||||
meta->addStatement(new GenOp(" @.rgb = toGamma(@.rgb);\r\n", outColor, outColor));
|
||||
|
||||
meta->addStatement(new GenOp(" @ += @ * @;\r\n",
|
||||
outColor, detailColor, detailBlend));
|
||||
|
||||
meta->addStatement(new GenOp(" @.rgb = toLinear(clamp(@.rgb, 0, 1));\r\n", outColor, outColor));
|
||||
|
||||
meta->addStatement( new GenOp( " }\r\n" ) );
|
||||
|
||||
output = meta;
|
||||
|
|
|
|||
|
|
@ -582,9 +582,13 @@ void TerrainDetailMapFeatHLSL::processPix( Vector<ShaderComponent*> &component
|
|||
|
||||
Var *outColor = (Var*)LangElement::find( getOutputTargetVarName(target) );
|
||||
|
||||
meta->addStatement(new GenOp(" @.rgb = toGamma(@.rgb);\r\n", outColor, outColor));
|
||||
|
||||
meta->addStatement( new GenOp( " @ += @ * @;\r\n",
|
||||
outColor, detailColor, detailBlend));
|
||||
|
||||
meta->addStatement(new GenOp(" @.rgb = toLinear(clamp(@.rgb, 0, 1));\r\n", outColor, outColor));
|
||||
|
||||
meta->addStatement( new GenOp( " }\r\n" ) );
|
||||
|
||||
output = meta;
|
||||
|
|
@ -848,9 +852,13 @@ void TerrainMacroMapFeatHLSL::processPix( Vector<ShaderComponent*> &componentL
|
|||
|
||||
Var *outColor = (Var*)LangElement::find( getOutputTargetVarName(target) );
|
||||
|
||||
meta->addStatement(new GenOp(" @.rgb = toGamma(@.rgb);\r\n", outColor, outColor));
|
||||
|
||||
meta->addStatement(new GenOp(" @ += @ * @;\r\n",
|
||||
outColor, detailColor, detailBlend));
|
||||
|
||||
meta->addStatement(new GenOp(" @.rgb = toLinear(clamp(@.rgb, 0, 1));\r\n", outColor, outColor));
|
||||
|
||||
meta->addStatement( new GenOp( " }\r\n" ) );
|
||||
|
||||
output = meta;
|
||||
|
|
|
|||
Loading…
Reference in a new issue