Godot Version 4.6.3
A screen reading shader
I am trying to make something like this, where the shader reads the literal screen and uses it in some way. Is it possible?
You’ll have to hook into the desktop OS’s native window manager to get access to every window on the shell, plus its rectangle position and dimensions, so you can sample the pixels of everything under your program’s rectangle.
I’m not sure if this is even possible on windows 11, mac OS or linux wayland. The final framebuffer does not hold the pixels your application covered, and to figure out what is behind your window you would have to either scan through all pixels of all other windows at that region, or screenshot a region of the screen on the exact moment the window manager is about to draw yours.