From 69cd9f5c239db5ccd2f019fdc0a23810e702d0c8 Mon Sep 17 00:00:00 2001 From: troublemaker52025 Date: Wed, 5 Jan 2022 23:27:11 +0800 Subject: [PATCH] fallback baidu not support shadow for v3.4.1 (#9897) --- cocos/core/scene-graph/scene-globals.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cocos/core/scene-graph/scene-globals.ts b/cocos/core/scene-graph/scene-globals.ts index fa0dd52ae9..f6ba9b5bb0 100644 --- a/cocos/core/scene-graph/scene-globals.ts +++ b/cocos/core/scene-graph/scene-globals.ts @@ -25,7 +25,7 @@ */ import { ccclass, visible, type, displayOrder, readOnly, slide, range, rangeStep, editable, serializable, rangeMin, tooltip, formerlySerializedAs, displayName, help } from 'cc.decorator'; -import { EDITOR } from 'internal:constants'; +import { BAIDU, EDITOR } from 'internal:constants'; import { TextureCube } from '../assets/texture-cube'; import { CCFloat, CCBoolean, CCInteger } from '../data/utils/attribute'; import { Color, Quat, Vec3, Vec2, Vec4 } from '../math'; @@ -696,6 +696,11 @@ export class ShadowsInfo { } } get enabled () { + if (BAIDU) { + if (this._type !== ShadowType.Planar) { + this._enabled = false; + } + } return this._enabled; }