Bug Issue: Inconsistency in openfl.filters


Pages: 1

Luyren

  • Master Stencyler
  • *
April 18, 2024, 12:21:10 pm
b12205, on Windows.

I'm playing around with the classes in https://api.openfl.org/openfl/filters, and I've got inconsistent results between web targets and desktop.

BlurFilter and ColorMatrixFilter work fine on both.

DropShadowFilter, GlowFilter and ConvolutionFilter have different results between flash and html5/desktop. Flash appears to display the correct results, while on html5 and desktop they are incorrect when applied to an actor. Applying the effects to image instances seems to work fine on all targets.

Initially with GlowFilter, it was only showing the actor's sprite if the "inner" parameter was true, otherwise the sprite was hidden. But after switching the value and compiling a few times the sprite no longer disappears. I don't know if it was human error or some memory thing I chalk up to "Stencyl being weird".

I tried to use ShaderFilter as well, but my attempts always resulted in the error:
com.stencyl.graphics.shaders.BloomShader should be openfl.display.Shader
This happened when I tried using the default shader blocks in Stencyl, like BloomShader. This could be my knowledge gap regarding shaders, but I'm reporting it to be safe.

Lastly, the "remove all effects from [actor]" block seems to be working correctly, but "remove all effects from [image instance]" doesn't remove these effects. The default Stencyl effect blocks are removed properly for both.

Attached an image comparing the three targets, I think this is more efficient than trying to explain the differences. To reiterate, I think Flash looks like the correct one.

Test game attached as well. Instance customization is used in each actor to change which effect is applied. The left side are the actors themselves, and on the right side are image instances. The Openfl Filters behavior contains all the code.

Test on both flash, HTML5 and windows standalone to see the difference. Press up/down to switch animations. I don't know if that should affect anything, but I left it in just in case testing it is needed.
I don't know how to remove attachments, so in the second "A Test Game File", press right to remove effects.
« Last Edit: April 18, 2024, 02:22:48 pm by Luyren »


New attachment added by Luyren - April 18, 2024, 12:21:33 pm


New attachment added by Luyren - April 18, 2024, 12:21:44 pm


New attachment added by Luyren - April 18, 2024, 02:21:25 pm


Pages: 1

Details

  • Reported
    April 18, 2024, 12:21:10 pm
  • Updated
    April 22, 2024, 07:21:51 am

  • View Status
    Public
  • Type
    Bug
  • Status
    New
  • Priority
    Normal
  • Version
    3.5.0 beta 1
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Compiling/Testing Games

Tags


Attachments


* openflerrors.png (165.21 kB, 2032x1066 - viewed 566 times.)
* A Test Game.stencyl (174.1 kB - downloaded 488 times.)
* A Test Game.stencyl (172.71 kB - downloaded 294 times.)