mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
disable shadows when there's no light (#4834)
This commit is contained in:
committed by
Weiliang Wang
parent
683b8919f0
commit
20e8058e2f
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user