BitmapData.pixels.setPixel32 broken on neko
-
Hi,
Currently I am getting some strange effects on neko. I am creating a vignette FlxSprite with the FlxSprite.pixels.setPixels32 function. The main line of code is
this.pixels.setPixel32(i, j, FlxColor.fromRGBFloat(0, 0, 0, a));
with a being a float in the range 0 to 1.
The Result on the hxcpp windows target (and also on flash & html5) looks like expected:
On neko it looks like this:
There are no conditionals and tracing
a
yields that the values are the same on windows and neko target. Is there any known workaround for neko?Thank you and so Far...
Laguna
-
Sounds like an OpenFL bug, maybe something to do with alpha premultiplication? You could try with
setPixels()
instead, not sure if it'll help.
-
How can that be reproduced? (do you have a code snippet?)
-
Hi,
sorry for not providing a code snippet. You can download a minimal example project here.
If you just want the code for the vignette class or don't want to download the project, see pastebinmy haxelib list
actuate: [1.8.6] box2d: [1.2.3] extension-admob: [1.5.0] extension-android-support-v4: [1.0.0] extension-googleplayservices-lib: [1.1.0] flixel-addons: 1.1.0 1.1.1 [2.0.0] flixel-demos: 1.1.2 [2.1.0] flixel-templates: 1.0.2 [2.0.1] flixel-tools: 1.1.1 1.1.2 [1.1.3] flixel-ui: 1.0.2 [2.0.0] flixel: 3.3.11 3.3.12 4.0.1 4.1.1 [4.2.0] ganalytics: [0.0.3] hxcpp: 3.2.180 3.2.193 3.2.205 3.3.47 [3.3.49] layout: [1.2.1] lime-samples: 2.5.1 [2.6.0] lime: 2.6.8 2.7.0 2.8.1 2.9.0 [2.9.1] openfl-samples: 3.1.0 3.3.0 [3.3.1] openfl: 3.0.0-beta.3 3.3.0 3.3.8 3.4.0 3.5.2 3.6.0 [3.6.1] samcodes-admob: [1.0.8] swf: 1.9.1 2.0.4 2.1.1 2.1.3 2.1.6 [2.2.0]
So Far...
Laguna
-
@thomastc Thank you for the suggestion. I tried, but
setPixels()
makes the problem even worse. It adds strange color noise.
-
This is definitely an OpenFL bug. Good news: it's fixed in OpenFL Next. Add this to your
Project.xml
before<haxelib name="flixel" />
to use OpenFL Next:<set name="next" />
-
Hi, this are great news. If i add the line to
project.xml
the example project crashes on neko. Windows and flash builds are fine. Do I need to download the next openfl version?So Far...
Laguna
-
Bad news: OpenFl Next crashes on Neko and Android
-
@Laguna I don't have that issue. Any error message?
You may want to try with Haxe 3.3.0-rc.1 if you're still on 3.2.x.
-
For me, OpenFl 3.6.1 in Next mode crashes everywhere, if sound is going to play, including HaxeFlixel logo beep in release. But if I mute sound with '0' (mute is saved across runs), it doesn't crash
-
Hi,
I am using haxe 3.3.0. If I use openfl next, disable the splashscreen, the project runs and displays the correct vignette effect. It seems like starry-abiss assumption is correct. Unfortunately, sound is important to me. But I think this is only a matter of time.
Again, thank you for the help!
So Far...
Laguna
-
Does it help if you remove
embed="true"
from this line of Flixel'sinclude.xml
?https://github.com/HaxeFlixel/flixel/blob/4.2.0/include.xml#L8
-
It's not an assumption, it's a sad fact. It's fixed in newer OpenFl versions however, if you dare to make any of them compatible with HaxeFlixel (and fix new bugs that aren't there in 3.6.1)