Object cannot have two webGL masking effects

Bugs will be moved here once resolved.

Post » Wed Feb 06, 2013 12:51 am

Link to .capx file (required!):
https://dl.dropbox.com/u/41931267/MaskBug.capx

Steps to reproduce:
1. Create a new project with 2 objects: something as a mask and something to apply the effects to.
2. Add two 'mask' webGL effects to the masking object.

Observed result:
Only the bottom effect has any effect.

Expected result:
Both effects should be applied on the bottom object.

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: N/A

Operating system & service pack:
Windows 7 home premium

Construct 2 version:
r117 business    sqiddster2013-02-06 00:51:41
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Feb 07, 2013 3:10 pm

I don't think we can make masks work together: currently it's pretty much by design that you can only use one mask per object. Masks work by returning an opaque image with the effect "baked in". Most mask effects also don't use the color of the image, just the alpha. So a mask followed by a mask naturally has the effect of using an opaque image on the last mask.

Workaround: use a non-mask version of the shader. E.g. mask HSL, then ordinary hexagonal pixellate. This processes the "baked in" image from the mask, rather than masking the baked-in image with the background, and seems to achieve what you were after. If that's not what you're after, I think you might need to get in to writing some GLSL yourself.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Thu Feb 07, 2013 3:39 pm

Thanks, @Ashley. I will certainly look into GLSL if I need some more advanced shaders. The hexagonal pixellate and adjust HSL were just for demonstration purposes.

I just tried it, and it works but does some weird things. Using hexagonal pixellate again as an example, for some unknown reason it's actually turning the image upside down! Oddly, if I set the mask to any angle other than 0 degrees it works. This may well be a specific hexagonal pixellate problem with which I have little interest, but I thought you might like to know.

https://dl.dropbox.com/u/41931267/MaskBug.capx
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Feb 07, 2013 3:45 pm

Re: flipping - it looks OK in Chrome, just seems to be an editor problem, can you confirm that's the case?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Thu Feb 07, 2013 6:01 pm

@sqiddster reminding myself so I can test when I get to a C2 pc.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Feb 07, 2013 7:29 pm

@Ashley, it happens for me in Chrome as well. (By the way, that text should say the only difference is their angles, not masks.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest