Skip to content

Commit 2059b4b

Browse files
committed
Update deps
2 parents e5042ea + 6b9cc11 commit 2059b4b

File tree

9 files changed

+61
-54
lines changed

9 files changed

+61
-54
lines changed

Cargo.lock

+19-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ ui = []
2121

2222
[dependencies]
2323
# Bump-a-lots
24-
bevy = { version = "0.15.0", features = ["file_watcher", "jpeg"] }
25-
bevy_egui = { version = "0.31.1" }
26-
bevy_panorbit_camera = "0.21.1"
24+
bevy = { version = "0.15.3", features = ["file_watcher", "jpeg"] }
25+
bevy_egui = { version = "0.33.0" }
26+
bevy_panorbit_camera = "0.23.0"
2727

2828

2929
# usually not bumped with bevy versions

assets/shaders/howto-texture.wgsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
1010
// ensure our uv coords match shadertoy/the-lil-book-of-shaders
1111
let texture_uvs = in.uv;
1212

13-
let tex: vec4f = texture_sample(texture, texture_sampler, texture_uvs);
13+
let tex: vec4f = textureSample(texture, texture_sampler, texture_uvs);
1414

1515
return tex;
1616
}

assets/shaders/myshader.wgsl

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//!
22
//! The default 3d Shader.
33
//!
4-
#import bevy_pbr::forward_io::VertexOutput, FragmentOutput
5-
#import bevy_pbr::mesh_view_bindings::globals
4+
#import bevy_pbr::forward_io::VertexOutput
5+
#import bevy_pbr::mesh_view_bindings::globals;
66
#import bevy_pbr::utils PI
7-
#import bevy_render::view::View
87
#import shadplay::shader_utils::common NEG_HALF_PI, shader_toy_default, rotate2D
9-
8+
#import bevy_render::view::View
9+
1010
@group(0) @binding(0) var<uniform> view: View;
1111

1212
@group(2) @binding(100)var<uniform> color: vec4f;
@@ -16,9 +16,11 @@
1616
const SPEED:f32 = 1.0;
1717

1818
@fragment
19-
fn fragment(in: VertexOutput) -> @location(0) vec4f {
19+
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
20+
// ensure our uv coords match shadertoy/the-lil-book-of-shaders
2021
let texture_uvs = in.uv;
21-
let tex: vec4f = textureSample(texture, texture_sampler, texture_uvs);
22+
23+
let tex: vec4f = textureSample(texture, texture_sampler, texture_uvs); // textureSample is provided by wgsl?
2224
return tex;
23-
// return vec4f(1.0);
24-
}
25+
26+
}

assets/shaders/myshader_2d.wgsl

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
const SPEED:f32 = 1.0;
1414

1515
@fragment
16-
fn fragment(mesh: VertexOutput) -> @location(0) vec4<f32> {
16+
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
1717
// ensure our uv coords match shadertoy/the-lil-book-of-shaders
18-
var uv = mesh.uv;
18+
var uv = in.uv;
1919
uv = (uv * 2.0) - 1.0;
2020
let resolution = view.viewport.zw;
2121
let t = globals.time * SPEED;

examples/might/src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ fn setup(
8080
num_cascades: 1,
8181
maximum_distance: 1.6,
8282
..default()
83-
}.build(),
83+
}
84+
.build(),
8485
));
8586

8687
// ground plane
@@ -176,4 +177,3 @@ fn quit_listener(input: Res<ButtonInput<KeyCode>>) {
176177
std::process::exit(0)
177178
}
178179
}
179-

scripts/reset-2d.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#import bevy_sprite::mesh2d_view_bindings::globals
77
#import shadplay::shader_utils::common::{NEG_HALF_PI, shader_toy_default, rotate2D, TWO_PI}
88
#import bevy_render::view::View
9-
#import bevy_pbr::forward_io::VertexOutput;
9+
#import bevy_sprite::mesh2d_vertex_output::VertexOutput
1010
1111
@group(0) @binding(0) var<uniform> view: View;
1212
@@ -15,13 +15,14 @@
1515
@fragment
1616
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
1717
// ensure our uv coords match shadertoy/the-lil-book-of-shaders
18-
var uv = (in.uv * 2.0) - 1.0;
18+
var uv = in.uv;
19+
uv = (uv * 2.0) - 1.0;
1920
let resolution = view.viewport.zw;
2021
let t = globals.time * SPEED;
2122
uv.x *= resolution.x / resolution.y;
2223
uv *= rotate2D(NEG_HALF_PI);
2324
24-
return vec4f(shader_toy_default(t, uv), 1.0);
25+
return vec4f(shader_toy_default(t, uv), 0.3);
2526
}
2627
2728
"""

src/ui/colour_picker_plugin.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use bevy::prelude::*;
22
use bevy_egui::egui::epaint::Shadow;
3-
use bevy_egui::egui::{Align2, Color32, RichText, Rounding, Vec2};
3+
use bevy_egui::egui::{Align2, Color32, CornerRadius, RichText, Rounding, Vec2};
44
use bevy_egui::{egui, EguiContexts, EguiPlugin};
55

66
use crate::system::clipboard::SystemClipboard;
@@ -55,18 +55,18 @@ impl ColourPickerTool {
5555
.resizable(false)
5656
.frame(egui::Frame {
5757
inner_margin: egui::Margin {
58-
left: 3.0,
59-
right: 3.0,
60-
top: 3.0,
61-
bottom: 3.0,
58+
left: 3,
59+
right: 3,
60+
top: 3,
61+
bottom: 3,
6262
},
6363
outer_margin: egui::Margin {
64-
left: 0.0,
65-
right: 0.0,
66-
top: 0.0,
67-
bottom: 0.0,
64+
left: 0,
65+
right: 0,
66+
top: 0,
67+
bottom: 0,
6868
},
69-
rounding: Rounding::same(2.0),
69+
corner_radius: CornerRadius::default(),
7070
shadow: Shadow::NONE,
7171
fill: Color32::from_black_alpha(2),
7272
stroke: egui::Stroke::NONE,

src/ui/help_ui.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use bevy::prelude::*;
22
use bevy_egui::egui::epaint::Shadow;
3-
use bevy_egui::egui::{Align2, Color32, RichText, Rounding, Vec2};
3+
use bevy_egui::egui::{Align2, Color32, CornerRadius, RichText, Rounding, Vec2};
44
use bevy_egui::{egui, EguiContexts};
55

66
/// Plugin:
@@ -53,18 +53,18 @@ fn help_window(mut ctx: EguiContexts) {
5353
.resizable(false)
5454
.frame(egui::Frame {
5555
inner_margin: egui::Margin {
56-
left: 3.0,
57-
right: 3.0,
58-
top: 3.0,
59-
bottom: 3.0,
56+
left: 3,
57+
right: 3,
58+
top: 3,
59+
bottom: 3,
6060
},
6161
outer_margin: egui::Margin {
62-
left: 0.0,
63-
right: 0.0,
64-
top: 0.0,
65-
bottom: 0.0,
62+
left: 0,
63+
right: 0,
64+
top: 0,
65+
bottom: 0,
6666
},
67-
rounding: Rounding::same(2.0),
67+
corner_radius: CornerRadius::default(),
6868
shadow: Shadow::NONE,
6969
fill: Color32::from_black_alpha(2),
7070
stroke: egui::Stroke::NONE,

0 commit comments

Comments
 (0)