Skip to content

Commit cb5a20c

Browse files
authored
Bevy 0.18 (#72)
1 parent 5ee3029 commit cb5a20c

20 files changed

+83
-67
lines changed

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bevy_mod_outline"
3-
version = "0.11.0"
3+
version = "0.12.0"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66
description = "A mesh outlining plugin for Bevy."
@@ -11,7 +11,7 @@ keywords = ["gamedev", "bevy", "outline"]
1111
categories = ["game-engines", "rendering"]
1212

1313
[dependencies]
14-
bevy = { version = "0.17.0", default-features = false, features = [
14+
bevy = { version = "0.18", default-features = false, features = [
1515
"std",
1616
"async_executor",
1717
"bevy_log",
@@ -23,7 +23,7 @@ bitfield = "0.15"
2323
interpolation = { version = "0.3", optional = true }
2424
thiserror = "1.0"
2525
nonmax = "0.5"
26-
wgpu-types = "26"
26+
wgpu-types = "27"
2727
itertools = { version = "0.14", optional = true }
2828

2929
[features]
@@ -33,11 +33,11 @@ reflect = []
3333
scene = ["bevy/bevy_scene"]
3434

3535
[dev-dependencies]
36-
bevy = { version = "0.17.0", default-features = false, features = [
37-
"animation",
36+
bevy = { version = "0.18", default-features = false, features = [
37+
"gltf_animation",
3838
"bevy_anti_alias",
3939
"bevy_gltf",
40-
"bevy_mesh_picking_backend",
40+
"mesh_picking",
4141
"bevy_pbr",
4242
"bevy_post_process",
4343
"bevy_sprite",

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ vertex extrusion and jump flood methods.
1212

1313
```toml
1414
[dependencies]
15-
bevy_mod_outline = "0.11"
15+
bevy_mod_outline = "0.12"
1616
```
1717

1818
## Examples
@@ -96,6 +96,7 @@ cargo run --example picking
9696

9797
| This Version | Bevy version |
9898
|--------------|--------------|
99+
| 0.12.x | 0.18.x |
99100
| 0.11.x | 0.17.x |
100101
| 0.10.x | 0.16.x |
101102
| 0.9.x | 0.15.x |

examples/animated_fox.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn main() {
1515
OutlinePlugin,
1616
AutoGenerateOutlineNormalsPlugin::default(),
1717
))
18-
.insert_resource(AmbientLight::default())
18+
.insert_resource(GlobalAmbientLight::default())
1919
.add_systems(Startup, setup)
2020
.add_systems(Update, setup_scene_once_loaded)
2121
.run();

examples/hollow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn main() {
1515
),
1616
)
1717
.add_plugins(OutlinePlugin)
18-
.insert_resource(AmbientLight::default())
18+
.insert_resource(GlobalAmbientLight::default())
1919
.add_systems(Startup, setup)
2020
.add_systems(
2121
Update,

examples/morph_targets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() {
2525
OutlinePlugin,
2626
AutoGenerateOutlineNormalsPlugin::default(),
2727
))
28-
.insert_resource(AmbientLight::default())
28+
.insert_resource(GlobalAmbientLight::default())
2929
.add_systems(Startup, setup)
3030
.add_systems(Update, (name_morphs, setup_outlines, setup_animations))
3131
.run();

examples/ui_aa.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ fn setup(
140140
border: UiRect::all(Val::Px(5.0)),
141141
justify_content: JustifyContent::Center,
142142
align_items: AlignItems::Center,
143+
border_radius: BorderRadius::MAX,
143144
..default()
144145
},
145146
BorderColor::all(Color::BLACK),
146-
BorderRadius::MAX,
147147
BackgroundColor(Color::srgb(0.2, 0.2, 0.2)),
148148
mode,
149149
))

examples/ui_mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,10 @@ fn create_buttons<T: Component + States>(builder: &mut ChildSpawnerCommands, val
211211
border: UiRect::all(Val::Px(5.0)),
212212
justify_content: JustifyContent::Center,
213213
align_items: AlignItems::Center,
214+
border_radius: BorderRadius::MAX,
214215
..default()
215216
},
216217
BorderColor::all(Color::BLACK),
217-
BorderRadius::MAX,
218218
BackgroundColor(Color::srgb(0.2, 0.2, 0.2)),
219219
value.clone(),
220220
))

src/common.wgsl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#define_import_path bevy_mod_outline::common
22

33
struct OutlineViewUniform {
4-
@align(16)
54
clip_from_world: mat4x4<f32>,
65
world_from_view_a: mat2x4<f32>,
76
world_from_view_b: f32,

src/flood/compose_output.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ use bevy::{
66
extract_component::{ComponentUniforms, DynamicUniformIndex},
77
render_resource::{
88
binding_types::{sampler, texture_2d, uniform_buffer},
9-
BindGroupEntries, BindGroupLayout, BindGroupLayoutEntries, CachedRenderPipelineId,
10-
FragmentState, PipelineCache, RenderPassDescriptor, RenderPipeline,
11-
RenderPipelineDescriptor, Sampler, SamplerDescriptor, ShaderType, StoreOp,
9+
BindGroupEntries, BindGroupLayoutDescriptor, BindGroupLayoutEntries,
10+
CachedRenderPipelineId, FragmentState, PipelineCache, RenderPassDescriptor,
11+
RenderPipeline, RenderPipelineDescriptor, Sampler, SamplerDescriptor, ShaderType,
12+
StoreOp,
1213
},
1314
renderer::{RenderContext, RenderDevice},
1415
texture::CachedTexture,
@@ -27,7 +28,6 @@ use super::{DrawMode, OutlineViewUniform, COMPOSE_OUTPUT_SHADER_HANDLE};
2728

2829
#[derive(Clone, Component, ShaderType)]
2930
pub(crate) struct ComposeOutputUniform {
30-
#[align(16)]
3131
pub volume_offset: f32,
3232
pub volume_colour: Vec4,
3333
}
@@ -48,7 +48,7 @@ pub(crate) fn prepare_compose_output_uniform(
4848

4949
#[derive(Clone, Resource)]
5050
pub(crate) struct ComposeOutputPipeline {
51-
pub(crate) layout: BindGroupLayout,
51+
pub(crate) layout: BindGroupLayoutDescriptor,
5252
pub(crate) sampler: Sampler,
5353
pub(crate) pipeline_cache: HashMap<ViewPipelineKey, CachedRenderPipelineId>,
5454
}
@@ -57,7 +57,7 @@ impl FromWorld for ComposeOutputPipeline {
5757
fn from_world(world: &mut World) -> Self {
5858
let render_device = world.resource::<RenderDevice>();
5959

60-
let layout = render_device.create_bind_group_layout(
60+
let layout = BindGroupLayoutDescriptor::new(
6161
"outline_flood_compose_output_bind_group_layout",
6262
&BindGroupLayoutEntries::sequential(
6363
ShaderStages::FRAGMENT,
@@ -193,6 +193,7 @@ impl<'w> ComposeOutputPass<'w> {
193193
view_entity: Entity,
194194
render_entity: Entity,
195195
input: &CachedTexture,
196+
pipeline_cache: &PipelineCache,
196197
bounds: &URect,
197198
) {
198199
let view_dynamic_index = self
@@ -210,7 +211,7 @@ impl<'w> ComposeOutputPass<'w> {
210211

211212
let bind_group = render_context.render_device().create_bind_group(
212213
"outline_flood_compose_output_bind_group",
213-
&self.pipeline.layout,
214+
&pipeline_cache.get_bind_group_layout(&self.pipeline.layout),
214215
&BindGroupEntries::sequential((
215216
&input.default_view,
216217
&self.pipeline.sampler,

src/flood/compose_output.wgsl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#import bevy_mod_outline::common::OutlineViewUniform
33

44
struct ComposeOutputUniform {
5-
@align(16)
65
volume_offset: f32,
76
volume_colour: vec4<f32>,
87
}

0 commit comments

Comments
 (0)