"Multipass" shaders and low-res buffers on native (GL)

  1. Is there a way to have “multipass” shaders using current implementation (i.e. apply shader, render to buffer, apply second shader on this buffer, render to screen)? When I use

bitmap.filters = [new ShaderFilter1(), new ShaderFilter2()];,

it just gives me black Bitmap object. Am I doing something wrong or is this a bug / not implemented yet?

  1. Is there some way, that we can apply shader on Bitmap and then upscale it, so the fragment shader isn’t applied on every pixel of the Bitmap on screen, but only on every pixel of its BitmapData? The behaviour between these two could probably be switched with bitmap.smoothing parameter?

I’m using mac target.

This needs to be improved, you can see some of the progress made, though, on the BlurFilter code, which renders to a framebuffer first, before running through multiple ping-pong passes

Thanks for reply.

There was a bug in 4.5.3 – when I changed __numPasses to anything else than 0, I just got black Bitmap object. I guess you know about this already, because it is fixed in 4.6.0.

Maybe I’ll finally get that shader based 2D lights working now. Thank you very much for all the work you put into this :slight_smile: