fix coefficients array not init when "updateProbes" needs to add a new probe (#16627)

This commit is contained in:
Knox
2023-12-20 10:07:27 +08:00
committed by GitHub
parent 0527eb59d3
commit 09f940a5d8
+4
View File
@@ -73,6 +73,10 @@ export class LightProbesData {
let probe = this._probes[i];
if (!probe) {
probe = new Vertex(points[i]);
for (let j = 0; j < SH.getBasisCount(); j++) {
probe.coefficients[j] = Vec3.ZERO;
}
this._probes[i] = probe;
} else {
probe.position.set(points[i]);
}