mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
fix coefficients array not init when "updateProbes" needs to add a new probe (#16627)
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user