disable shadows when there's no light (#4834)

This commit is contained in:
Yun Hsiao Wu
2019-07-08 15:20:21 +08:00
committed by Weiliang Wang
parent 683b8919f0
commit 20e8058e2f
+1
View File
@@ -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);