MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / ProgressiveResult

Method ProgressiveResult

BakingLab/MeshBaker.cpp:330–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328 }
329
330 void ProgressiveResult(Float4 bakeOutput[BasisCount], uint64 passIdx)
331 {
332 SH9Color shResult = ResultSum;
333 shResult.ConvolveWithCosineKernel();
334 H6Color result = ConvertToH6(shResult) * HemisphereMonteCarloFactor(1);
335
336 const float lerpFactor = passIdx / (passIdx + 1.0f);
337 for(uint64 i = 0; i < BasisCount; ++i)
338 {
339 Float3 newSample = result.Coefficients[i];
340 Float3 currValue = bakeOutput[i].To3D();
341 currValue = Lerp<Float3>(newSample, currValue, lerpFactor);
342 bakeOutput[i] = Float4(Float3::Clamp(currValue, -FP16Max, FP16Max), 1.0f);
343 }
344 }
345};
346
347// Bakes radiance into a set of SG lobes, which is computed using a solve or by

Callers

nothing calls this directly

Calls 6

ConvertToH6Function · 0.85
ClampFunction · 0.85
To3DMethod · 0.80
Float4Class · 0.50

Tested by

no test coverage detected