Weird filter ghosting bug in v8.x

Hello,

I’m working on a project, porting an AS3 AIR app to Haxe/OpenFL, and was quite happy when you bumped the version to 8, noticed that a lot of bugs have been fixed, thanks for that.

However I’m having a weird issue with filters (currently using only GlowFilter) on imported MovieClips with more than one frame. Please take a look at the attached image. In OpenFL 7, everything looks fine, but in 8 (even with the latest 8.1.1) frames are getting duplicated on gotoAndStop(), and weird ghosting of previous frames and filters appear. This issue is present on HTML5 and Windows targets as well (did not test the rest yet). I tried the recommended -Dopenfl-disable-gl-cacheasbitmap but it didn’t really help, the issue is still present. I assume it has something to do with the newly implemented filter caching.

Notes:

  • The filter is put globally on the imported MovieClip (not on the frame graphics)
  • There’s no manual forced cacheAsBitmap in the code, but even with that enabled the result is the same
  • As I progress through the frames manually the ghosting effect even gets weirder, even more blurry remains of previous frames and filters (see “frame 3” at the bottom part of the image)
  • Setting filters=null fixes the issue, but I need the glow effect for this project, so it’s not really an option
  • If I switch back to OpenFL7 everything goes back to normal
  • The issue is present on CAIRO and OpenGL as well

Can anyone please advise?
Thanks a lot!

Is there any way you could share some of your code?

There is a fix for canvas and cairo cacheAsBitmap (used when -Dopenfl-disable-gl-cacheasbitmap) here:

…but I think there’s still an edge case that occurs sometimes with the GL-based cacheAsBitmap that I want to figure out, but haven’t gotten a small enough test case to find it

Thank you :grin:

1 Like

Thank you for chiming in, sent you a PM with the samples.

Thank you! It appears to be fixed with the current development version. We’ll try and get a release out :slight_smile:

1 Like

Any chance this will be incorporated any time soon? I’m still having the issue, on latest dev.

Found this thread a couple days ago, maybe the user is having the same issue?

OpenFL 8.3.0 was released, with the previous development build fixes, but I just made one more fix that might be necessary for filters to work properly:

It would be great to hear if this helps you, or if there’s a simple sample I could test to reproduce the issue. However, this fixed an issue specifically to DropShadowFilter objects disappearing