godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.93k stars 20.17k forks source link

ViewportTexture doesn't update when used as a Light3D projector texture #74352

Open betalars opened 1 year ago

betalars commented 1 year ago

Godot version

4.0 release

System information

nixos-unstable

Issue description

See this Video on YouTube illustrating it

  1. Add a Spot light, Configure it to use a projected texture
  2. Create a sub-viewport and put something into it that moves
  3. set the Viewport to always update
  4. Assign a Viewport Texture and choose the created Viewport

OBSERVED: Sometimes the projector image does not update, sometimes iit will just show GPU Memory Glitches EXPECTED: the cookie shows what's happening in the viewport

Minimal reproduction project

Minimal Steps to Reproduce minimal-lighting-cookie.zip

betalars commented 1 year ago

probably related to #73400

AThousandShips commented 1 year ago

What is a lighting cookie?

betalars commented 1 year ago

What is a lighting cookie?

I have not the slightest idea where my brain took that name.

Obviously, i meant to refer to the texture you can put as a projector, as demonstrated in the video.

clayjohn commented 1 year ago

Since the buggy part of this report is the same as https://github.com/godotengine/godot/issues/74353, I have renamed this to be more clear that it is for a discussion of having the ViewportTexture update when used as a projector texture. This is the same root problem as https://github.com/godotengine/godot/issues/73400, just with projector textures instead of decals