+1 vote

On the left are 2 Sprite shadows with alpha of 0.5

What I Want

I thought I could work around this by using draw_rect but no :<
draw_ functions also work like this

in Engine by (4,165 points)

1 Answer

+1 vote
Best answer

Put both boxes on a separate scene
Put the scene in a Viewport node
Set the Transparent Bg on on the Viewport
Put the Viewport in a ViewportContainer
Set the Viewport container's modulate property to 0.5

dee end

by (158 points)
selected by

Interesting! I wonder how I could do this for hundreds of objects.

You would put the objects in the scene. Dah. You can put all these objects below the Viewport node and have them interact with your main scene. The Viewport will output one texture that you can then set to transparent (don't forget the ViewportContainer).
The best solution would be for the Engine to have a node with the modulate property that automatically composes one texture of its children. Sadly, a node that merges its children like that is only available in the "Alabama" version of the engine.

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 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 webmaster@godotengine.org with your username.