Use wgpu from git

This commit is contained in:
Werner
2022-04-01 09:25:11 -03:00
parent 7d9e0731bd
commit 832ea811e7
2 changed files with 8 additions and 8 deletions

View File

@ -30,5 +30,5 @@ log = "0.4"
pollster = "0.2" pollster = "0.2"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
tobj = "3.0" tobj = "3.0"
wgpu = "0.12.0" wgpu ={ git = "https://github.com/GuilhermeWerner/wgpu" }
winit = "0.26.1" winit = "0.26.1"

View File

@ -1,16 +1,16 @@
// Vertex // Vertex
struct VertexInput { struct VertexInput {
[[location(0)]] position: vec3<f32>; @location(0) position: vec3<f32>,
[[location(1)]] color: vec3<f32>; @location(1) color: vec3<f32>,
}; };
struct VertexOutput { struct VertexOutput {
[[builtin(position)]] clip_position: vec4<f32>; @builtin(position) clip_position: vec4<f32>,
[[location(0)]] color: vec3<f32>; @location(0) color: vec3<f32>,
}; };
[[stage(vertex)]] @stage(vertex)
fn vs_main( fn vs_main(
model: VertexInput, model: VertexInput,
) -> VertexOutput { ) -> VertexOutput {
@ -22,7 +22,7 @@ fn vs_main(
// Fragment // Fragment
[[stage(fragment)]] @stage(fragment)
fn fs_main(in: VertexOutput) -> [[location(0)]] vec4<f32> { fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
return vec4<f32>(in.color, 1.0); return vec4<f32>(in.color, 1.0);
} }