Effects on cpp targets

So…what is the best way to achieve effects such as blur or glow on cpp targets?
Using “flash filters” has really low performance. If there is no other way, it would be great if we could use shaders.

At this point, the better way is draw your scene into framebuffer with GL and than use shaders to apply effects…
But Joshua says, that we will see custom shaders for Sprites soon. That will be very good feature!
Sorry for my English. :slight_smile:

You can also just draw a sprite to a buffer instead of the whole scene. Currently, it is tricky to integrate these post-processing effects with glview but it is possible.

Applying shaders to Sprites or even Bitmaps would be amazing :slight_smile: As for drawing objects to buffer…unfortunately I’m not sure how to do that.

Hint: You need to add an glview as child that starts “recording” to buffer. The subsequent children will be rendered there instead of screen. Then add another glview as child to draw the results (using gl and shaders) and stop “recording” to buffer.

Yep, in Lime legacy (OpenFL “v2”) the filters are all implemented in software. Using Lime (and OpenFL “next”) custom shaders are already working in a limited way, updates should be coming that make it even more robust.



Sorry to revive an old topic. I just wanted to inform that now there is code available of the mentioned aproach for doing postprocessing effects for targets that can use oglview https://github.com/madrazo/nme-go

Samples include GPU Blur and Bloom

Currenty has been tested on nme and openfl legacy but it should be compatible with openfl/lime with some tweaks.

Comments and contributions are welcome