# Phaser 3.24.0 canvas Mask not working on img within a container

**URL:** https://phaser.discourse.group/t/phaser-3-24-0-canvas-mask-not-working-on-img-within-a-container/9655
**Category:** Phaser 3
**Created:** [May 24, 2021, 2:38am UTC](https://phaser.discourse.group/t/phaser-3-24-0-canvas-mask-not-working-on-img-within-a-container/9655 "2021-05-24T02:38:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![as3mbus](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/as3mbus/32/3328_2.png) [@as3mbus](https://phaser.discourse.group/u/as3mbus)
#### Post date: [May 24, 2021, 2:38am UTC](https://phaser.discourse.group/t/phaser-3-24-0-canvas-mask-not-working-on-img-within-a-container/9655/1 "2021-05-24T02:38:03Z")

</div>

hello. an curious question, why mask is not working on object added on a container.

this only happen when using canvas render mode.

webgl object within a container  
 ![image](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/8/8d16d4e85990b5b5a2f711bdbb2c5873af7ea563.png)

canvas object within a container  
 ![image](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/a/afa3cbd883353f85188f4eea34b6c85416599f60.png)

canvas object outside of container  
 ![image](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/f/f7233135d3f59ac6a1c0173282fa29bc8b266598.png)

---

<div class="post-metadata">

### Author: ![Milton](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@Milton](https://phaser.discourse.group/u/Milton)
#### Post date: [May 24, 2021, 2:58pm UTC](https://phaser.discourse.group/t/phaser-3-24-0-canvas-mask-not-working-on-img-within-a-container/9655/2 "2021-05-24T14:58:46Z")

</div>

Probably a WebGL Only feature. A lot of intensive shader thingies are not supported for Canvas.

---

<div class="post-metadata">

### Author: ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)
#### Post date: [May 24, 2021, 6:07pm UTC](https://phaser.discourse.group/t/phaser-3-24-0-canvas-mask-not-working-on-img-within-a-container/9655/3 "2021-05-24T18:07:35Z")

</div>

Bitmap masks are WebGL only.

---

<div class="post-metadata">

### Author: ![as3mbus](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/as3mbus/32/3328_2.png) [@as3mbus](https://phaser.discourse.group/u/as3mbus)
#### Post date: [May 25, 2021, 3:22am UTC](https://phaser.discourse.group/t/phaser-3-24-0-canvas-mask-not-working-on-img-within-a-container/9655/4 "2021-05-25T03:22:39Z")

</div>

it’s geometry mask made from graphic rectangle
