Skip to content

Commit

Permalink
Bevy 13 (#87)
Browse files Browse the repository at this point in the history
* wip: took more than the 30 mins I have available -- will have to finish this later

* wip: keycodes, digits... misc renaming

* wip: 2d working -- panic on 3d checking that out now...

* chore: they've all gotta be on grout 2 bevyengine/bevy#10485

* chore: bulk replace all group(1)s to group(2)s for bevy 0.13..

* fix: make the might example work

* chore: make the cube much, much bigger!
  • Loading branch information
alphastrata authored Feb 28, 2024
1 parent edbd6c6 commit ba71396
Show file tree
Hide file tree
Showing 21 changed files with 6,838 additions and 1,118 deletions.
3,156 changes: 2,168 additions & 988 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ ui = []
[dependencies]
anyhow = "1.0.79"
bevy = { version = "*", features = ["file_watcher", "dynamic_linking", "jpeg"] }
bevy_egui = { version = "0.23.0" }
bevy_panorbit_camera = { version = "0.9.0" }
chrono = "0.4.31"
bevy_egui = "0.25.0"
bevy_panorbit_camera = "0.15.0"
chrono = "0.4.34"
copypasta = "0.10.0"
directories = "5.0.1"
image = "0.24.8"
image = "0.24.9"
serde = { version = "1.0.190", features = ["derive"] }
toml = "0.8.6"
toml = "0.8.10"

[dev-dependencies]
bevy_editor_pls = "0.6.0" # Required for Might
Expand Down
2 changes: 1 addition & 1 deletion assets/Gallery/lines/dotted_line.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct DottedLineShader {
line_spacing: f32,
};

@group(1) @binding(0)
@group(2) @binding(0)
var<uniform> material: DottedLineShader;

@fragment
Expand Down
4 changes: 2 additions & 2 deletions assets/shaders/WIP-black-hole.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

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

@group(1) @binding(0) var texture: texture_2d<f32>;
@group(1) @binding(1) var texture_sampler: sampler;
@group(2) @binding(0) var texture: texture_2d<f32>;
@group(2) @binding(1) var texture_sampler: sampler;

const SPEED:f32 = 0.25;
const CAM_DISTANCE: f32 = -2.;
Expand Down
2 changes: 1 addition & 1 deletion assets/shaders/aura.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct AuraMaterial {
}

@group(0) @binding(0) var<uniform> view: View;
@group(1) @binding(100) var<uniform> aura_mat: AuraMaterial;
@group(2) @binding(100) var<uniform> aura_mat: AuraMaterial;

// Colour picker tells us the values of the original..
// Darkish
Expand Down
2 changes: 1 addition & 1 deletion assets/shaders/howto-mouse.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#import bevy_render::view View
@group(0) @binding(0) var<uniform> view: View;

@group(1) @binding(0) var<uniform> mouse: YourShader2D;
@group(2) @binding(0) var<uniform> mouse: YourShader2D;
struct YourShader2D{
mouse_pos : vec2f,
}
Expand Down
4 changes: 2 additions & 2 deletions assets/shaders/howto-texture.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#import bevy_pbr::mesh_vertex_output VertexOutput

@group(1) @binding(1) var texture: texture_2d<f32>;
@group(1) @binding(2) var texture_sampler: sampler;
@group(2) @binding(1) var texture: texture_2d<f32>;
@group(2) @binding(2) var texture_sampler: sampler;

@fragment
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
Expand Down
8 changes: 2 additions & 6 deletions assets/shaders/myshader.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#import bevy_render::view View
@group(0) @binding(0) var<uniform> view: View;

@group(1) @binding(1) var texture: texture_2d<f32>;
@group(1) @binding(2) var texture_sampler: sampler;
@group(2) @binding(1) var texture: texture_2d<f32>;
@group(2) @binding(2) var texture_sampler: sampler;

const SPEED:f32 = 1.0;

Expand All @@ -23,7 +23,3 @@ fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
return tex;
}


fn circle(p: vec2<f32>, r: f32) -> f32 {
return smoothstep(0.1, 0., abs(length(p) - r));
}
Loading

0 comments on commit ba71396

Please sign in to comment.