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

Method ProgressiveResult

BakingLab/MeshBaker.cpp:96–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 }
95
96 void ProgressiveResult(Float4 bakeOutput[BasisCount], uint64 passIdx)
97 {
98 const float lerpFactor = passIdx / (passIdx + 1.0f);
99 Float3 newSample = ResultSum * CosineWeightedMonteCarloFactor(1);
100 Float3 currValue = bakeOutput[0].To3D();
101 currValue = Lerp<Float3>(newSample, currValue, lerpFactor);
102 bakeOutput[0] = Float4(Float3::Clamp(currValue, 0.0f, FP16Max), 1.0f);
103 }
104};
105
106// Bakes irradiance projected onto the Half-Life 2 basis, with 9 floats per texel

Callers

nothing calls this directly

Calls 4

ClampFunction · 0.85
To3DMethod · 0.80
Float4Class · 0.50

Tested by

no test coverage detected