I’ve got a fairly simple setup to mask an image in UI:
-
Canvas
-
Mask (Canvas Renderer, Image (.png), Mask)
-
Image (Canvas Renderer, Image (.png))
In an empty project, with nothing else in a scene, this works properly on all devices, including our lowest-spec iPad Air 2. However, in our production project, this same setup does not work on iPad Air 2 – the image is completely visible, as if the mask was not even there. On all other devices the masking does work as expected.
Is there a reason why this particular setup wouldn’t work on-device in our project? The scene it’s in does contain a number of other UI canvases, but changing the sort order of this particular canvas to be before or after all other canvases doesn’t change the outcome.
Is there perhaps a hardware limitation we’re running into in-game, with many more objects in the scene and many more canvases being rendered? A depth/stencil buffer being an upper limit on the number of canvases or masked objects? A rendering order problem? This is the only device on which we’re having this problem (all of them support Metal).