HaxeFlixel/flixel-demos

DynamicShadows broken on HTML5

Gama11 opened this issue · 6 comments

Not a new issue, but DynamicShadows is pretty busted on HTML5:

This is unfortunately still an issue with OpenFL 8, and now applies to the Neko (and presumably Windows) as well. That's interesting, because it actually worked with OpenFL 3.6.1 Legacy and Next on Neko.

@jgranick Any idea what's going on here? Using some un-implemented API maybe?

The missing API are blend modes (multiply specifically in this case).

I was looking at this recently and wondered if 2D lighting+shadows could be done with the help of shaders in Flixel now?

Perhaps using the technique detailed here: https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows

But it's been a couple of years since I've worked with OpenFL/Flixel in any depth, so not sure if it's possible, or where best to start looking.

Have you seen https://github.com/Pixelbear/flixelighting (which was already possible with OpenFL 3.6.1 + -Dnext)?

I hadn't seen that, thanks for the tip!

This now works fine again with current dev branches of OpenFL and Flixel, thanks to HaxeFlixel/flixel#2199.