Anyone else having this issue with WebGL effects?

0 favourites
  • 13 posts
From the Asset Store
Best soundtracks for any game. High quality and engaging assets.
  • 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.

    <img src="" border="0" />

    <img src="" border="0" />

    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

  • Looks like texture bleeding. Try adding an empty one pixel border around your sprites and see what happens.

  • 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?

    <img src="" border="0" />

  • Does it happen to all sprites or just some? What kind of effect is it?

  • 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

  • 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.


    Was ludei able to help you with your issue?

  • 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.

  • Sigmag

    they didn't reply to my

  • You should share a minimal .capx showing the issue so we can play around with it ourselves. Otherwise we're just guessing.

  • 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! :/

  • Well, one of the things i read about on the forums in regards to fixing this was setting your texture filtering to "point" mode, and setting the pixel rounding parameter to "on". Could you check to see if that works?

    Also, if we are speaking about graphical glitches, anyone know what to do in regards to this:

    <img src="" border="0" />

    The laptop in question doesn't support shaders, any tips? Seems to persist in all of the releases i've tried.

    (those are 9-patches and spritefonts, btw)

  • - looks like a driver bug. Are your graphics card drivers up to date? That might also explain why shaders aren't supported - browsers disable WebGL support if the driver is too buggy.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Are your graphics card drivers up to date?

    The actual manufacturing of the graphics card has long been discontinued.

    I guess that leaves no question about the drivers - i probably have the latest version, from 2007 or something. The pc is a bit of a relic - shaders aren't supported by the graphics card at all.

    I just wanted to see if anyone else is having similar issues or if this is an isolated case (pc specific). The drawing seemed to work earlier in r139, but became like this after i added a new sprite for the spritefont object. Either way, i guess this information is of no use, as this problem is specific to me (don't waste your time). Thanks for the response, anyways...


    Went back and checked, when is the problem persistent - turns out that the spritefont object works perfectly with the default font, but fails whenever i load my own font, a perfectly normal .png image. Computers are weird.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)