Skip to content

🐞 Label + BMF 第二次 onEnable 后(从 pool 取出重用)会打断任何 batch (DrawCall 💥) #18595

@yingDev

Description

@yingDev

原因是这里:

this.renderData!.material = this.material;

  • 第二次 onEnableget material() {} 会导致 this._materialInstances[0] = new MaterialInstance(),它与其它任何材质不相等,因此打断所有 batch

  • 👆并且这一行应该是多余的,因为 RenderData.prototype.updateRenderData(this) 里面会执行 this.renderData.material = this.getRenderMaterial(0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions