diff --git a/CHANGELOG.md b/CHANGELOG.md index 48b02c8..e811896 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,10 +15,14 @@ Subheadings to categorize changes are `added, changed, deprecated, removed, fixe - There is now a `default_font` feature that uses the same `FiraMono-subset.ttf` font used in the bevy/default_font feature. - There is now a `render_layers` example. - There is now a `cube_3d` example. +- You may now choose the render layers for the Vello canvas. This can be configured through the `VelloPlugin`. +- You may now choose to use CPU rendering with Vello and configure anti-aliasing. This can be configured through the `VelloPlugin`. ### Changed - `VelloPlugin` now has configuration. To retain previous behavior, use `VelloPlugin::default()`. +- `VelloRenderer` is now a resource. +- The `VelloRenderer` will attempt CPU fallback if it cannot obtain a GPU. - The font API has changed significantly. Please visit `examples/text` for further usage. This is to prepare for additional text features such as linebreak behavior, bounded text, and text justification. - `VelloText` has been renamed to `VelloTextSection`. - `VelloText.content` has been renamed to `VelloText.value`. @@ -27,11 +31,13 @@ Subheadings to categorize changes are `added, changed, deprecated, removed, fixe - The field `VelloAssetBundle.vector` was renamed to `VelloAssetBundle.asset`. - Renamed `VelloAssetAlignment` to `VelloAssetAnchor`. Fields were renamed `alignment` were renamed to `asset_anchor`. - Renamed `VelloTextAlignment` to `VelloTextAnchor`. Fields were renamed `alignment` were renamed to `text_anchor`. -- The `SSRenderTarget` (fullscreen quad that renders your frame) no longer renders at a zepth of `-0.001`. This was a legacy hack used to ensure Gizmos rendered on-top. +- The `SSRenderTarget` (fullscreen quad that renders your frame) no longer renders at a zepth of `-0.001`. This was a legacy hack used to ensure Gizmos rendered on-top. `RenderLayers` should be used now (there's an example). ### Removed - Removed `ZFunction`s from the render pipeline. Now ordering is based solely on the `Transform`'s z component. If you dependeded on this behavior, you'll need to adjust the transform Z in a system prior to render. +- `VelloRenderPlugin` is now private, as it is not helpful for downstream developers to add manually. +- Removed `VelloCanvasMaterial` from prelude, as it is not typical to use. ### Fixed diff --git a/examples/cube3d/src/main.rs b/examples/cube3d/src/main.rs index 11cf294..60ad858 100644 --- a/examples/cube3d/src/main.rs +++ b/examples/cube3d/src/main.rs @@ -33,7 +33,11 @@ fn main() { let mut app = App::new(); app.add_plugins(DefaultPlugins) - .add_plugins(VelloPlugin::default()) + .add_plugins(VelloPlugin { + use_cpu: false, + antialiasing: vello::AaConfig::Msaa8, + ..default() + }) .add_systems(Startup, setup) .add_systems(Update, cube_rotator_system) .add_plugins(ExtractComponentPlugin::::default()); @@ -115,15 +119,14 @@ fn setup( } fn render_texture( - mut vello_renderer: Local>, + renderer: Res, + render_settings: Res, target: Query<&VelloTarget>, device: Res, gpu_images: Res>, queue: Res, time: Res