Open danboo opened 3 years ago
Ok, I can confirm this bug. Maybe it's not 100% what it's happening with @danboo, but I guess that it's related. I will give more information.
Godot version: v3.3.2.stable
OS/device including version: Linux Mint 19.03, NVIDIA GTX 1660, GLES3 I can also confirm this happening in Windows (idk exactly the hardware)
Issue description:
This is only happening in GLES3, using Light2D with Mix Mode
and only when we use it as a child of a Viewport.
When we draw a Light2D with Mix Mode
, we don't see the alpha channel of the light (i think... see the photos because idk how to explain it correctly haha)
2DScene.tscn (GLES2/GLES3) -> No problem
ViewportContainer.tscn (GLES2) -> No problem
ViewportContainer.tscn (GLES3) -> Bad
I realized that if we enable "Transparent bg" in "Viewport" it will fix the problem, but I got other problems that I don't want.
I don't know when it was introduced. It doesn't seems to be related to batch rendering, because even if I disabled it, it still happens.
Steps to reproduce:
2DScene.tscn
it's a normal 2D Scene with lights, that seems OK.ViewportContainer.tscn
that contains an ViewportContainer
+ Viewport
, and the 2DScene
instanciated in it, and here you will see the artifact.Minimal reproduction project: Viewport2DLightTest.zip
Godot version: v3.2.4.rc2.official
OS/device including version: Windows 10, Nvidia 1070, GLES3
Issue description: I have a scene that contains
Light2D
nodes withmode
set tomix
. These lights have shadows enabled, withshadow_gradient_length
set to8
. These lights are occluded by walls (LightOccluder2D
) in the scene. This works fine when I play the scene directly.The issue is that I want to play this scene in a sub-
Viewport
via aViewportContainer
, but when doing so, the shadows behave differently, and don't appear to be fully occluded. There seems to be light bleeding into the wall'sLightOccludder2D
.I've reduced it to a simple example using a simple square to represent the wall occluder. This is what I see when playing the original scene and behaves as expected by showing a completely black (occluded) square.
After reparenting the same scene to a
ViewportContainer
you can see the slight gradient at the bottom of the square (difficult to see on a white background):Steps to reproduce:
DefaultViewport
scene. Observe that the square is full black.AlternateViewport
scene. Observe that the square has a grey gradient near the bottom.Minimal reproduction project:
BleedingShadows.zip