Skip to content

Commit

Permalink
fix coefficients array not init when "updateProbes" needs to add a ne…
Browse files Browse the repository at this point in the history
…w probe
  • Loading branch information
knoxHuang committed Dec 19, 2023
1 parent 0527eb5 commit 192e840
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cocos/gi/light-probe/light-probe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down

0 comments on commit 192e840

Please sign in to comment.