forward lit ambient application. fix GL side IBL overwriting forward lit color.a

This commit is contained in:
AzaezelX 2022-06-07 11:18:53 -05:00
parent 5be18a4638
commit 0e0088cab9
2 changed files with 30 additions and 5 deletions

View file

@ -3149,7 +3149,15 @@ void ReflectionProbeFeatHLSL::processPix(Vector<ShaderComponent*> &componentList
meta->addStatement(new GenOp(computeForwardProbes.c_str(), new DecOp(ibl), surface, cubeMips, numProbes, worldToObjArray, probeConfigData, inProbePosArray, refScaleArray, inRefPosArray, eyePos,
skylightCubemapIdx, BRDFTexture,
irradianceCubemapAR, specularCubemapAR));
Var *ambient = (Var *)LangElement::find("ambient");
if (!ambient)
{
ambient = new Var("ambient","float4");
eyePos->uniform = true;
eyePos->constSortPos = cspPass;
}
meta->addStatement(new GenOp(" @.rgb *= @.rgb;\r\n", ibl, ambient));
meta->addStatement(new GenOp(" @.rgb = @.rgb;\r\n", curColor, ibl));
output = meta;