Anyone else having this issue with WebGL effects?

Discussion and feedback on Construct 2

Post » Wed Oct 09, 2013 5:43 am

Hey guys,

We are pulling our hair out trying to figure out what might cause the problem we are having.

Essentially every time we apply any webGL effect to a sprite, we get a 1px line beneath the sprite, and in some cases to the left/top/right as well.

It only happens when we export through CJS; this issue does not happen in chrome.

I've attached a couple of screenshots, but I can't include a capx because we are about 90% done with development.

Just trying to narrow down the possibilities, and since this doesn't happen with a new capx it's likely something in our logic. However, we have 2500 events and hundreds of variables, so if anyone knows a good place to start that'd be fantastic.





Couple of things we've tried:

Putting a wait before enabling the effect (This helps alleviate the issue on SF, but not completely, does not work on other sprites)

Turning on pixel rounding - no dice
Sigmag2013-10-09 05:44:42
ImageImageImage
B
16
S
3
Posts: 45
Reputation: 2,188

Post » Wed Oct 09, 2013 6:06 am

Looks like texture bleeding. Try adding an empty one pixel border around your sprites and see what happens.
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Wed Oct 09, 2013 6:18 am

No such luck :\

It only appears when applying a webGL effect, the line doesn't show up on the sprite otherwise.

How can I address the texture bleeding of a webGL effect?

ImageImageImage
B
16
S
3
Posts: 45
Reputation: 2,188

Post » Wed Oct 09, 2013 6:37 am

Does it happen to all sprites or just some? What kind of effect is it?
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Wed Oct 09, 2013 6:37 am

@Sigmag

in the past I got something similar with TiledBackground: on Chrome ok, but after CocoonS export there was some "border" :) [and the strange thing: it was most visible on the left side, and disappearing on the right side of screen] As far as I remember when I asked Ashley, he replied to contact Ludei
B
18
S
7
G
1
Posts: 783
Reputation: 4,237

Post » Wed Oct 09, 2013 7:22 am

@ErekT

It doesn't happen on all sprites, and it's not always consistent on the sprites it does happen to.

So far it's done this with horizontal blur, set color and tint. I'm assuming it does it for every effect.

I tried re-sizing the image to match a sprite that isn't having this problem (no change) and I just cut out half of the sprite in different parts of the image to change it to see if it made a change, and the line is the same.

@szymek

Was ludei able to help you with your issue?Sigmag2013-10-09 07:31:27
ImageImageImage
B
16
S
3
Posts: 45
Reputation: 2,188

Post » Wed Oct 09, 2013 7:52 am

Hmm, that's weird. The inconsistency could be due to sprite-placement on the screen at different times (whether interpolation kicks in or not). If it happens just to some sprites I thought it could be an almost invisible stray pixel somewhere that gets amplified from being drawn multiple times, like if several layers of blurred images get drawn on top of each other. But since you tried cutting away different portions that isn't the case probably.

But sprites are packed onto sprite atlases, so if other sprites don't have an empty 1-2 pixel border around them they could still mess with the drawing of those that do.
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Wed Oct 09, 2013 8:05 am

@Sigmag

they didn't reply to my @
B
18
S
7
G
1
Posts: 783
Reputation: 4,237

Post » Wed Oct 09, 2013 10:32 am

You should share a minimal .capx showing the issue so we can play around with it ourselves. Otherwise we're just guessing.
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694

Post » Fri Nov 01, 2013 2:48 am

We ended up resolving this issue by applying the Set Color WebGL effect to a layer and moving the SF to that layer when we wanted to color it. In the screenshots above we were trying to apply the effect directly to the SF objects. I'm pretty sure this is advice that was given in numerous places on these forums, but we like to do it wrong and get frustrated and then try it the right way I guess! :/
ImageImageImage
B
38
S
5
G
4
Posts: 79
Reputation: 5,355

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 11 guests