Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 47 additions & 52 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,25 @@ edition = "2024"
license = "MIT"
repository = ""



[workspace.dependencies]
# API
ash = "0.38"
ash-window = "0.13"
gpu-allocator = { version = "0.28.0", default-features = false, features = ["std", "vulkan"] }
wgpu = { version = "29.0.1", default-features = false, features = ["std", "parking_lot", "vulkan", "vulkan-portability", "spirv", "wgsl"] }
pollster = "0.4.0"
wgpu = { version = "30.0.1", default-features = false, features = ["std", "parking_lot", "vulkan", "vulkan-portability", "spirv", "wgsl"] }
pollster = "1.0.1"

# rust-gpu
cargo-gpu-install = { version = "0.10.0" }
spirv-std = { version = "0.10.0" }

# other
glam = { version = "0.33.11", default-features = false }
# math libraries
glam = { version = "0.33.11", default-features = false, features = ["bytemuck"] }
bytemuck = { version = "1.24.0", features = ["derive"] }

# other
raw-window-handle = "0.6.2"
winit = "0.30.0"
env_logger = "0.11.8"
Expand Down
8 changes: 6 additions & 2 deletions generated/graphics/ash/cargo-gpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ repository = ""
[workspace.lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] }



[workspace.dependencies]
# API
ash = "0.38"
Expand All @@ -26,9 +28,11 @@ gpu-allocator = { version = "0.28.0", default-features = false, features = ["std
cargo-gpu-install = { version = "0.10.0" }
spirv-std = { version = "0.10.0" }

# other
glam = { version = "0.33.11", default-features = false }
# math libraries
glam = { version = "0.33.11", default-features = false, features = ["bytemuck"] }
bytemuck = { version = "1.24.0", features = ["derive"] }

# other
raw-window-handle = "0.6.2"
winit = "0.30.0"
env_logger = "0.11.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ edition = "2024"
[lints]
workspace = true



[dependencies]
# rust-gpu
spirv-std.workspace = true

# math libraries
glam.workspace = true
bytemuck.workspace = true
11 changes: 5 additions & 6 deletions generated/graphics/ash/cargo-gpu/mygraphics-shaders/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

use bytemuck::{Pod, Zeroable};
use core::f32::consts::PI;
use glam::{Vec3, Vec4, vec2, vec3};
use glam::{Vec2, Vec3, Vec4, vec2, vec3};
#[cfg(target_arch = "spirv")]
use spirv_std::num_traits::Float;
use spirv_std::spirv;

#[derive(Copy, Clone, Pod, Zeroable)]
#[repr(C)]
pub struct ShaderConstants {
pub width: u32,
pub height: u32,
pub time: f32,
pub speed: f32,
pub offset: Vec2,
}

#[spirv(fragment)]
Expand All @@ -27,9 +27,8 @@ pub fn main_vs(
#[spirv(position)] vtx_pos: &mut Vec4,
vtx_color: &mut Vec3,
) {
let speed = 0.4;
let time = constants.time * speed + vert_id as f32 * (2. * PI * 120. / 360.);
let position = vec2(f32::sin(time), f32::cos(time));
let time = constants.time * constants.speed + vert_id as f32 * (2. * PI * 120. / 360.);
let position = vec2(f32::sin(time), f32::cos(time)) + constants.offset;
*vtx_pos = Vec4::from((position, 0.0, 1.0));

*vtx_color = [vec3(1., 0., 0.), vec3(0., 1., 0.), vec3(0., 0., 1.)][vert_id as usize % 3];
Expand Down
9 changes: 8 additions & 1 deletion generated/graphics/ash/cargo-gpu/mygraphics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ repository.workspace = true
[lints]
workspace = true



[dependencies]
# shader crate
mygraphics-shaders = { path = "../mygraphics-shaders" }
Expand All @@ -19,11 +21,16 @@ ash.workspace = true
ash-window.workspace = true
gpu-allocator.workspace = true

# math libraries
glam = { version = "0.33.11", default-features = false, features = ["bytemuck"] }
bytemuck = { version = "1.24.0", features = ["derive"] }

# other
raw-window-handle.workspace = true
winit.workspace = true
anyhow.workspace = true
bytemuck.workspace = true



[build-dependencies]
# rust-gpu
Expand Down
Loading
Loading