0 votes

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.

Godot version 3.4
in Engine by (157 points)

1 Answer

+1 vote

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 :)

by (12,795 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.