Open abraaofilho10 opened 3 years ago
I tested in the new stable 3.3 and the bug still happens.
@chalcosoma Can you reproduce this after disabling batching in the Project Settings? Also, try switching to the GLES2 renderer and see if the problem persists.
@Calinou I tested now and the result was that the problem only occurs in GLES3, both with and without batching. In GLES2 the problem doesn't occur.
The problem persists in Godot 3.4 stable.
Godot version:
Godot Mono 3.2.2 x64 Godot 3.3 rc8 x64
OS/device including version:
Windows 10 Pro 20H2 Build: 19042.928 x64 GeForce GTX1050 Ti Driver 465.89
Issue description:
I'm using a Node2D with a draw function to draw a grid on the screen. The Node2D is inside a CanvasLayer with a layer property set to 0. The GUI is inside a CanvasLayer with the layer set to 1. I intend to draw the grid in the background but when I play, the grid is drawn always above the GUI. I found that the problem occurs only when the Control nodes have a theme and a style with an alpha value below 255.
Steps to reproduce: Run the minimal reproduction project or follow the steps below:
1 - Create a scene with the following structure:
2 - The CanvasLayer1 layer is set to 1 and the CanvasLayer2 layer is set to 0. 3 - Create a new theme with a button class item, set the normal style to StyleBoxFlat, and set some color with an alpha value less than 255.
4 - Add the following script to Node2D https://github.com/GDQuest/godot-demos MIT License
Minimal reproduction project:
CanvasLayer bug.zip