[HTML5 - Lime 6.0.1 - Openfl 7.0.0] Mask problems in Firefox


#1

Hi,
I have just noticed that in some cases in Firefox the masks don’t work correctly.
In Chrome I see this:

correct_fiche

The fiches is made of:

  • a base texture (the white+shadows) part
  • the color part upon it, using multiply blendmode
  • text
  • circular mask, a Shape
  • a container for all of these elements

This is how it appears if I don’t set the mask as the mask of the container:

fiche_mask

And this is how it appears in Firefox if I apply the mask:

mask_bug

both in webGL and canvas render.
The base texture is masked, but the color part with the blendmode is ignored.

If I disable the blendmode I obtain this:

no blendmode

And this is what I obtain by restoring blendmode and applying cacheAsBitmap = true to the container:

cacheAsBitmap

That is identical to the render of Chrome without cacheAsBitmap.

What can you tell me about this difference between Chrome and Firefox?


#2

It would be awesome if you had a way of sharing some sample code, I have a suspicion that it has to do with the GL blend mode when drawing the stencil buffer, but I’d be afraid of making a blind fix without being able to test. Which version of Firefox?


#3

Well, I am not sure it is something related to GL blend mode, because the problem exists in canvas mode too.

FF 58.0.2 (64 bit).
Sample code… trying to extract it…