Hi,
I saw a cool but fake 2d lighting which looks great, can be achieved with minimal effort. Its also very performance friendly, as the author stated. The full post is here,
http://techblog.orangepixel.net/2015/07/shine-a-light-on-it/
Achieved result:
What is actually done here is:
- First you draw your game scene as usual.
- Then you draw all your lights onto a framebuffer or an intermediate texture with additive blending.
- Then draw the framebuffer or the intermediate texture over the scene with multiply blending.
Its as simple as that, and one can draw all their lights with just single draw call.
So my questions are,
- Does openfl supports hardware accelerated blending modes? Someone on haxeflixel forum said that openfl-legacy uses software blending which is slow.
- Does openfl supports hardware accelerated render to texture? I noticed bitmapdata.draw(…) but is it hardware accelerated or is it fast like writing to framebuffer, mentioned in the blog post?
Thank you!