You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a canvas background in a world environment results in a blank background.
I think the issue stems from the way gd4 handles negative canvas layers. In order to use a canvas as a background in GD3 you'd set it to a negative layer (so it's not drawn on top of the 3d scene) then set the max layer on the environment background to -1. This would result in your canvas being drawn in the background of your 3d scene. In GD4, when you've set the background to canvas, setting a negative max layer results in nothing being drawn, resulting in a hall-of-mirrors effect instead of your background.
This is a problem because it seems to break using a canvas as a background, which would be the intent of the canvasBackground mode for WorldEnvironment.
This appears to be a regression from Godot 3, where this worked.
(Edit: repro'd this in Beta 3, same issue)
Steps to reproduce
Three top level nodes:
CanvasLayer
Put some stuff in to draw
set layer to -1
WorldEnvironment
Set background to canvas, max layer -1
It may be the same fix as above, but this presents in a fairly different context (most of the discussion there is about how it breaks 2d) so I think it's worth keeping open as an issue, but that's up to you!
EamonnMR
added a commit
to EamonnMR/galactic-night
that referenced
this issue
Oct 20, 2022
Godot version
v4.0beta3
System information
Lubuntu
Issue description
Using a canvas background in a world environment results in a blank background.
I think the issue stems from the way gd4 handles negative canvas layers. In order to use a canvas as a background in GD3 you'd set it to a negative layer (so it's not drawn on top of the 3d scene) then set the max layer on the environment background to -1. This would result in your canvas being drawn in the background of your 3d scene. In GD4, when you've set the background to canvas, setting a negative max layer results in nothing being drawn, resulting in a hall-of-mirrors effect instead of your background.
This is a problem because it seems to break using a canvas as a background, which would be the intent of the canvasBackground mode for WorldEnvironment.
This appears to be a regression from Godot 3, where this worked.
(Edit: repro'd this in Beta 3, same issue)
Steps to reproduce
Three top level nodes:
Put some stuff in to draw
set layer to -1
Set background to canvas, max layer -1
Put in a camera and some 3d stuff to draw
This illustrates the problem.
Minimal reproduction project
canvas_background_example_gd3.zip
canvas_background_example_gd4.zip
The text was updated successfully, but these errors were encountered: