diff --git a/cocos/renderer/scene/planar-shadows.ts b/cocos/renderer/scene/planar-shadows.ts index 5856c93072..a933174d6b 100644 --- a/cocos/renderer/scene/planar-shadows.ts +++ b/cocos/renderer/scene/planar-shadows.ts @@ -147,6 +147,7 @@ export class PlanarShadows { public updateCommandBuffers () { this._cmdBuffs.clear(); + if (!this._scene.mainLight.enabled) { return; } for (const model of this._scene.models) { if (!model.enabled || !model.node || !model.castShadow) { continue; } let pso = this._psoRecord.get(model);