Take screenshot/somehow read per-pixel transparency texture

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By droc101

I am trying to implement a background effect in my program, but I cannot seem to read the per pixel transparency image. I am trying to get an image of what the screen looks behind the godot window. I have tried viewport get_texture() and shader SCREEN_TEXTURE, but none of them have worked.

Is there any way to do this? It only needs to work on Windows.

:bust_in_silhouette: Reply From: Calinou

Godot cannot read the screen behind a transparent window, unless you call an external utility that takes screenshots of the desktop using OS.execute(). In fact, Godot is not even aware of what’s located behind the window. This is how transparent window drawing can remain fast :slight_smile: