voxell-tech/bevy_motiongfx

Pixelated style with `RenderTarget`

Closed this issue · 10 comments

I'm trying to use this library with a RenderTarget camera to achieve a pixelated style, but none of the meshes are showing up at all.

I'm using the camera from this example here: https://github.com/bevyengine/bevy/blob/release-0.13.1/examples/2d/pixel_grid_snap.rs.

Normal Meshes work just fine. If I replace it with the default camera, the Vello meshes also show up just fine.

This would be a nice feature, however at the moment, maybe we should focus more on the foundation first 🤣

Yeah, I wasn't asking for something built-in, just wondering why the plugin fails to work when used with a RenderTarget camera. Is there something special going on with the render pipeline?

Yeah, we are using a custom render target for vello graphics (https://github.com/nixon-voxell/bevy_vello_renderer/blob/main/src/render_pipeline.rs)

let Ok((camera, view)) = q_camera.get_single() else {
    return;
};

I'm guessing that this means that the vello renderer only works for single-camera setups? That's a pretty big oof for anyone working with multiple cameras.

true, this could be solve by simply using a for loop, however, I feel like some stuff are still necessary maybe

  • defining which Vello objects to render at which camera
  • which camera can render Vello object

I have not used much multi cameras before, what do you think? or should we just render everything on every camera for now?

Shouldn't it render based on RenderLayers? So if the vello entity contains a RenderLayers::layer(1) component, it should only render to cameras from the same layer etc.

ahh that makes sense now, thanks for pointing that out :D

@musjj We are now using bevy_vello as our backend. I think this issue can be up-streamed into their repo.

Looks like it's already handled by this issue: linebender/bevy_vello#58

It's funny that both implementations ended up facing the exact same issue :p

Should this be closed?

Yeah we can close it for now.