mirror of
https://github.com/guilhermewerner/wgpu-renderer
synced 2025-06-15 05:14:20 +00:00
Use wgpu from git
This commit is contained in:
@ -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"
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user