From 03c00eb21a800e0700009d2a8ba07cc7176c5085 Mon Sep 17 00:00:00 2001 From: xubing <58895777@qq.com> Date: Thu, 20 Jul 2023 19:05:55 +0800 Subject: [PATCH] probe type --- cocos/3d/framework/mesh-renderer.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cocos/3d/framework/mesh-renderer.ts b/cocos/3d/framework/mesh-renderer.ts index 00d82bb0e8d..2132c568b88 100644 --- a/cocos/3d/framework/mesh-renderer.ts +++ b/cocos/3d/framework/mesh-renderer.ts @@ -901,10 +901,11 @@ export class MeshRenderer extends ModelRenderer { // because the lighting map will influence the model's shader this._model.initLightingmap(this.bakeSettings.texture, this.bakeSettings.uvParam); this._updateUseLightProbe(); - this._updateUseReflectionProbe(); + this._updateUseReflectionProbeType(); this._updateModelParams(); this._onUpdateLightingmap(); this._onUpdateLocalShadowBiasAndProbeId(); + this._updateUseReflectionProbe(); this._updateReceiveDirLight(); this._onUpdateReflectionProbeDataMap(); this._onUpdateLocalReflectionProbeData(); @@ -1185,6 +1186,11 @@ export class MeshRenderer extends ModelRenderer { this._updateReflectionProbeTexture(); } + protected _updateUseReflectionProbeType () { + if (!this._model) return; + this._model.reflectionProbeType = this.bakeSettings.reflectionProbe; + } + protected _updateBakeToReflectionProbe () { if (!this._model) { return; } this._model.bakeToReflectionProbe = this.bakeSettings.bakeToReflectionProbe;