I'm trying to create a bloom effect on some 2D vector graphics. I've tried doing this myself for a while but I can't figure out how to get the drawn colors into a texture that a pixel shader can read. I'm using the OpenGLGraphicsContextCustomShader since it says it's good for per pixel effects:
"Used to create custom shaders for use with an openGL 2D rendering context.
Given a GL-based rendering context, you can write a fragment shader that applies some kind of per-pixel effect."
I could probably get what I wanted by using a OpenGLShaderProgram but it doesn't seem like the 'correct' solution for this.
Has anyone had any experience writing a shader that runs on 2D graphics like a blur, bloom, removing a color channel or something like that? Or maybe I'm just missing some obvious way I can pass a texture into the shader created by a OpenGLGraphicsContextCustomShader. I'd appreciate any help, thanks!