Open dannymcgee opened 1 month ago
So it looks like Bevy UI also ignores RenderLayers
. 😂 Upon further inspection, there's actually a TargetCamera
component in Bevy UI that serves this purpose. That doesn't fix my issue with non-UI stuff rendering to the UI camera, but I guess I'll have to come up with another solution for that. Closing this since it matches Bevy's behavior.
EDIT: Just kidding, Bevy does respect the render layers.
This is definitely something I'd love to accept in a PR, or get to as time permits.
I'm experimenting with Vello in a Bevy 3D project, where I have my cameras set up like this:
With the intention being that anything that needs to be rendered in 2D-world-space as an overlay on top of the 3D scene should get
RenderLayers::layer(1)
, so that it only gets rendered by the 2D camera.However, when I tried to spawn a
VelloSceneBundle
with aRenderLayers::layer(1)
component, it didn't render at all. After some debugging, I discovered that after changing the camera's render layers toRenderLayers::layer(0).with(1)
, theVelloScene
started rendering as expected, indicating thatbevy_vello
's rendering systems are ignoring theRenderLayers
component.This is problematic for me, because allowing my 2D camera to render layer 0 causes it to render some other things that it shouldn't (e.g., 3D-world-space Gizmos with an always-in-front depth bias).
Edit: I just read over the discussion in #49, so it looks like you're already aware of the issue. 🙂 Let me know if there's anything I can do to help!