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
Setting the Viewport's scaling_3d_scale to any value except 1.0 while the WorldEnvironment's background_mode is set to BG_CANVAS breaks Z sorting in Compatibility renderer.
#97039
Closed
atomius0 opened this issue
Sep 15, 2024
· 2 comments
· Fixed by #97131
In a 3D scene, the Z sorting(?) breaks when setting the Viewport's "scaling_3d_scale" (or "rendering/scaling_3d/scale" in the project settings) to any value except 1.0 while the WorldEnvironment's background_mode is set to "Canvas" (Environment.BG_CANVAS).
Setting the scaling_3d_scale back to 1.0, or changing the background_mode to "Clear Color" (Environment.BG_CLEAR_COLOR) makes the Z sorting go back to normal.
This issue only occurs with the Compatibility renderer. (I tested it on Linux, Windows and in Web exports)
It does not occur when using the Forward+ or Mobile renderers.
The same issue occurs with these configurations, too (the System information field only allows one line, so I'll paste them here):
Tested versions
System information
Godot v4.3.stable - Fedora Linux 37 (KDE Plasma) - X11 - GLES3 (Compatibility) - AMD Radeon RX 6650 XT (navi23, LLVM 15.0.7, DRM 3.49, 6.2.8-200.fc37.x86_64) - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)
Issue description
In a 3D scene, the Z sorting(?) breaks when setting the Viewport's "scaling_3d_scale" (or "rendering/scaling_3d/scale" in the project settings) to any value except 1.0 while the WorldEnvironment's background_mode is set to "Canvas" (Environment.BG_CANVAS).
Setting the scaling_3d_scale back to 1.0, or changing the background_mode to "Clear Color" (Environment.BG_CLEAR_COLOR) makes the Z sorting go back to normal.
This issue only occurs with the Compatibility renderer. (I tested it on Linux, Windows and in Web exports)
It does not occur when using the Forward+ or Mobile renderers.
The same issue occurs with these configurations, too (the System information field only allows one line, so I'll paste them here):
Godot v4.4.dev2 - Fedora Linux 37 (KDE Plasma) - X11 - OpenGL 3 (Compatibility) - AMD Radeon RX 6650 XT (navi23, LLVM 15.0.7, DRM 3.49, 6.2.8-200.fc37.x86_64) - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)
Godot v4.3.stable - Windows 6.1.7601 - GLES3 (Compatibility) - GeForce GTX 750 Ti - AMD FX(tm)-6350 Six-Core Processor (6 Threads)
Steps to reproduce
run the minimal reproduction project: everything looks normal.
drag the "scaling_3d_scale" slider to any value other than 1.0: Z sorting breaks.
change "background_mode" to "Clear Color": it looks fine again, no matter what scale it is set to.
Minimal reproduction project (MRP)
env_bg_canvas_z_bug.zip
The text was updated successfully, but these errors were encountered: