Post Processing


What is currently the easiest way to add a post processing custom GLSL shader to the Stage?

In 2014 it was possible by using OpenGLView. Now I can’t figure that out anymore, because I can’t override the OpenGLView render function.

All the hints here in the forums did not work, at least with OpenFL 7. And I read adding custom shaders to sprites, bitmaps etc. is temporary disabled.

So I am wondering if it is really not possible to add a post processing shader over the screen/stage in OpenFL7 without going crazy?

I know how to use vertices, textures and shaders with lime/openfl, but then I don’t know how to render the framebuffer to a texture and then render that to the screen. Maybe I’ve overseen a simpler approach, so I am asking.

Something like "stage.addPostProcess(“shader.frag”). :slight_smile:


I figured out I had to override in OpenGLView

__renderGL(rs:RenderSession) instead of render(rect:Rectangle).

and after some trying the post process works. This is some old code from haxe flixel or haxepunk and I just had to update it.


I’d be interested to see what the code looks like, does it create a framebuffer as use that as the render target, then render again with a custom shader? or is another approach used?

Thanks :slight_smile: