Skip to content

Commit

Permalink
Update color uniform of MeshMaterial if alpha mode changes (pixijs#8330)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev7355608 committed May 18, 2022
1 parent 0aa699e commit f07f871
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/mesh/src/MeshMaterial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ export class MeshMaterial extends Shader
{
if (this.uniforms.uSampler !== value)
{
if (!this.uniforms.uSampler.baseTexture.alphaMode !== !value.baseTexture.alphaMode)
{
this._colorDirty = true;
}

this.uniforms.uSampler = value;
this.uvMatrix.texture = value;
}
Expand Down

0 comments on commit f07f871

Please sign in to comment.