Skip to content

Commit 2722fd6

Browse files
committed
make setMaterialForRenderPass call resetDrawCache
1 parent 3e0752c commit 2722fd6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/dev/core/src/Meshes/abstractMesh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ export class AbstractMesh extends TransformNode implements IDisposable, ICullabl
498498
* @param material material to use for this render pass. If undefined is passed, no specific material will be used for this render pass but the regular material will be used instead (mesh.material)
499499
*/
500500
public setMaterialForRenderPass(renderPassId: number, material?: Material): void {
501+
this.resetDrawCache(renderPassId);
501502
if (!this._internalAbstractMeshDataInfo._materialForRenderPass) {
502503
this._internalAbstractMeshDataInfo._materialForRenderPass = [];
503504
}

0 commit comments

Comments
 (0)