-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VelloScene
doesn't respect Bevy RenderLayers
#58
Comments
So it looks like Bevy UI also ignores 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. |
@dannymcgee Let me know if I'm offbase from your needs. Likewise, I'm adding @musjj and @nixon-voxell because they had a similar issue on voxell-tech/bevy_motiongfx#40. Please feel free to give thoughts. |
I'll add the reason I was looking into this as well: I have a Camera2d where I want to render all ui from a bevy_vello powered ui crate, and a Camera3d where I want to render "everything else" (gltf scenes, gizmos, effects, etc. game stuff). If the Camera2d doesn't have a RenderLayers specified, then it will render a bunch of "extra" stuff, such as gizmos I'm using in the 3d camera. So ideally I would be able to order +1 on Camera2d, which places it over the 3d camera, and use RenderLayers to target all vello content to the Camera2d. I believe this still fits the "one pass" model of vello as it is only one layer. |
Fixed via #68 - Please re-open a new issue if there are further render layer issues. There is also a new example for render layers. |
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!
The text was updated successfully, but these errors were encountered: