Applying OpenGL Shader to Screen or Window

Hi!

I'm looking to create a system utility to apply an openGL shader (or Metal?) to the window that the user is focused on (or the screen), ideally with a keyboard shortcut.

From what I can tell, applying OpenGL shaders or pixel level modifications to the whole screens at a time is possible (e.g. BlackLight by Michel Fortin). Any pointers to this kind of thing would be great.

Combining Automator workflows with some system-level code seems like it would do the trick but I'm not sure where to start.

Update: It looks like CGColorSpace might be helpful for applying color transforms to windows. Perhaps there's a way to make a swift app similar to Rectangle that could modify these CoreGraphics elements instead of the coordinates / transform ones?

Thanks for the help, Jack

Applying OpenGL Shader to Screen or Window
 
 
Q