Skip to content

Commit 5621547

Browse files
authored
Merge pull request #122 from alphastrata/BEVY-SEVENTEEN
Bevy Seventeen
2 parents 97a54f0 + be3ebeb commit 5621547

File tree

24 files changed

+1579
-1093
lines changed

24 files changed

+1579
-1093
lines changed

Cargo.lock

Lines changed: 1320 additions & 1003 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ description = "Might, is an attempt to recreate the legendary Pally aura of the
1616

1717
[features]
1818
default = ["ui"]
19-
wayland = ["bevy/wayland"]
20-
ui = []
19+
ui = ["bevy_egui"]
2120

2221
[dependencies]
2322
# Bump-a-lots
24-
bevy = { version = "0.16.1", features = ["file_watcher", "jpeg"] }
25-
bevy_egui = { version = "0.35.0" }
23+
bevy = { version = "0.17.0", features = ["file_watcher", "jpeg"] }
24+
bevy_egui = { version = "0.37.0", optional = true }
2625

2726
# usually not bumped with bevy versions
2827
anyhow = "1.0.79"
@@ -31,10 +30,10 @@ copypasta = "0.10.0"
3130
directories = "6.0.0"
3231
image = "0.25.1"
3332
serde = { version = "1.0.190", features = ["derive"] }
34-
toml = "0.8.10"
33+
toml = "0.9.7"
3534

3635
[dev-dependencies]
37-
bevy = { version = "0.16.1", features = [
36+
bevy = { version = "0.17.0", features = [
3837
"file_watcher",
3938
"jpeg",
4039
"dynamic_linking",

assets/shaders/aura.wgsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ struct AuraMaterial {
88
}
99

1010
@group(0) @binding(0) var<uniform> view: View;
11-
@group(2) @binding(100) var<uniform> aura_mat: AuraMaterial;
11+
@group(3) @binding(100) var<uniform> aura_mat: AuraMaterial;
1212

1313
// Colour picker tells us the values of the original..
1414
// Darkish
1515
// #CEAA4F
16-
const GOLD = vec3f(0.807843, 0.666667, 0.309804);
16+
const GOLD: vec3f = vec3f(0.807843, 0.666667, 0.309804);
1717
const SPIKE_NUM: f32 = 9.0;
1818
const SPIKE_LEN: f32 = 1.68;
1919
const SPIKE_SPEED:f32 = 32.0;

assets/shaders/howto-mouse.wgsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#import bevy_render::view View
77
@group(0) @binding(0) var<uniform> view: View;
88

9-
@group(2) @binding(0) var<uniform> mouse: YourShader2D;
9+
@group(3) @binding(0) var<uniform> mouse: YourShader2D;
1010
struct YourShader2D{
1111
mouse_pos : vec2f,
1212
}

assets/shaders/howto-texture.wgsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#import bevy_sprite::mesh2d_vertex_output::VertexOutput
44

5-
@group(2) @binding(1) var texture: texture_2d<f32>;
6-
@group(2) @binding(2) var texture_sampler: sampler;
5+
@group(3) @binding(1) var texture: texture_2d<f32>;
6+
@group(3) @binding(2) var texture_sampler: sampler;
77

88
@fragment
99
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {

assets/shaders/myshader.wgsl

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
1-
//!
2-
//! The default 3d Shader.
3-
//!
41
#import bevy_pbr::forward_io::VertexOutput
5-
#import bevy_pbr::mesh_view_bindings::globals;
6-
#import bevy_pbr::utils PI
7-
#import shadplay::shader_utils::common NEG_HALF_PI, shader_toy_default, rotate2D
2+
#import bevy_pbr::mesh_view_bindings::globals
83
#import bevy_render::view::View
9-
4+
105
@group(0) @binding(0) var<uniform> view: View;
116

12-
@group(2) @binding(100)var<uniform> color: vec4f;
13-
@group(2) @binding(101) var texture: texture_2d<f32>;
14-
@group(2) @binding(102) var texture_sampler: sampler;
7+
@group(3) @binding(100)var<uniform> color: vec4f;
8+
@group(3) @binding(101) var texture: texture_2d<f32>;
9+
@group(3) @binding(102) var texture_sampler: sampler;
1510

16-
const SPEED:f32 = 1.0;
11+
const SPEED: f32 = 1.0;
1712

1813
@fragment
1914
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
20-
// ensure our uv coords match shadertoy/the-lil-book-of-shaders
2115
let texture_uvs = in.uv;
22-
23-
let tex: vec4f = textureSample(texture, texture_sampler, texture_uvs); // textureSample is provided by wgsl?
16+
let tex: vec4f = textureSample(texture, texture_sampler, texture_uvs);
2417
return tex;
25-
2618
}

assets/shaders/myshader_2d.wgsl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
/// ***************************** ///
2-
/// THIS IS THE DEFAULT 2D SHADER ///
3-
/// You can always get back to this with `python3 scripts/reset-2d.py` ///
4-
/// ***************************** ///
5-
61
#import bevy_sprite::mesh2d_view_bindings::globals
7-
#import shadplay::shader_utils::common::{NEG_HALF_PI, shader_toy_default, rotate2D, TWO_PI}
8-
#import bevy_render::view::View
92
#import bevy_sprite::mesh2d_vertex_output::VertexOutput
3+
#import shadplay::shader_utils::common::{NEG_HALF_PI, shader_toy_default, rotate2D}
4+
#import bevy_render::view::View
105

116
@group(0) @binding(0) var<uniform> view: View;
127

138
const SPEED: f32 = 1.0;
149

1510
@fragment
1611
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
17-
// ensure our uv coords match shadertoy/the-lil-book-of-shaders
1812
var uv = in.uv;
1913
uv = (uv * 2.0) - 1.0;
2014
let resolution = view.viewport.zw;
@@ -23,4 +17,4 @@ fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
2317
uv *= rotate2D(NEG_HALF_PI);
2418

2519
return vec4f(shader_toy_default(t, uv), 0.3);
26-
}
20+
}

assets/shaders/shadertoy-ports/cyber-anim-arrowX.wgsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
@group(0) @binding(0) var<uniform> view: View;
1212

1313
const SPEED:f32 = 0.2; //Global Speed multiplier
14-
const NUM_ARROWS = 3.0; // Number of arrows spawned (see the for-loop below)
15-
const COLOUR_TEMP = 0.02; // The 'intensity' of the red channel in the arrows.
14+
const NUM_ARROWS: f32 = 3.0; // Number of arrows spawned (see the for-loop below)
15+
const COLOUR_TEMP: f32 = 0.02; // The 'intensity' of the red channel in the arrows.
1616

1717
@fragment
1818
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {

assets/shaders/shadertoy-ports/light-spirals.wgsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
const SPEED:f32 = 0.30;
1313
const PI: f32 = 3.14159265359;
14-
const TWO_PI = 6.2848;
15-
const NUM_ITER = 8.0;
14+
const TWO_PI: f32 = 6.2848;
15+
const NUM_ITER: f32 = 8.0;
1616

1717
@fragment
1818
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {

examples/might/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
bevy = { version = "0.16.1", features = [
7+
bevy = { version = "0.17.0", features = [
88
"file_watcher",
99
"jpeg",
1010
"dynamic_linking",

0 commit comments

Comments
 (0)