From 6b5238bd3dc8db586e816f2ee697fb2bb47f097b Mon Sep 17 00:00:00 2001 From: troublemaker52025 Date: Mon, 7 Jun 2021 15:39:02 +0800 Subject: [PATCH] delete update local descriptorSet v3.3 (#8775) --- cocos/core/pipeline/render-shadow-map-batched-queue.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cocos/core/pipeline/render-shadow-map-batched-queue.ts b/cocos/core/pipeline/render-shadow-map-batched-queue.ts index 922df67f88..4538ca3aa7 100644 --- a/cocos/core/pipeline/render-shadow-map-batched-queue.ts +++ b/cocos/core/pipeline/render-shadow-map-batched-queue.ts @@ -125,14 +125,11 @@ export class RenderShadowMapBatchedQueue { public add (model: Model, cmdBuff: CommandBuffer, _shadowPassIndices: number[]) { const subModels = model.subModels; - const shadowMapBuffer = this._pipeline.descriptorSet.getBuffer(UBOShadow.BINDING); for (let j = 0; j < subModels.length; j++) { const subModel = subModels[j]; const shadowPassIdx = _shadowPassIndices[j]; const pass = subModel.passes[shadowPassIdx]; const batchingScheme = pass.batchingScheme; - subModel.descriptorSet.bindBuffer(UBOShadow.BINDING, shadowMapBuffer); - subModel.descriptorSet.update(); if (batchingScheme === BatchingSchemes.INSTANCING) { // instancing const buffer = InstancedBuffer.get(pass); @@ -145,7 +142,7 @@ export class RenderShadowMapBatchedQueue { } else { const shader = pass.getShaderVariant(); this._subModelsArray.push(subModel); - this._shaderArray.push(shader!); + if (shader) this._shaderArray.push(shader); this._passArray.push(pass); } }