mirror of
https://github.com/guilhermewerner/wgpu-renderer
synced 2025-06-14 21:04:21 +00:00
Use wgpu from git
This commit is contained in:
@ -30,5 +30,5 @@ log = "0.4"
|
||||
pollster = "0.2"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tobj = "3.0"
|
||||
wgpu = "0.12.0"
|
||||
wgpu ={ git = "https://github.com/GuilhermeWerner/wgpu" }
|
||||
winit = "0.26.1"
|
||||
|
@ -1,16 +1,16 @@
|
||||
// Vertex
|
||||
|
||||
struct VertexInput {
|
||||
[[location(0)]] position: vec3<f32>;
|
||||
[[location(1)]] color: vec3<f32>;
|
||||
@location(0) position: vec3<f32>,
|
||||
@location(1) color: vec3<f32>,
|
||||
};
|
||||
|
||||
struct VertexOutput {
|
||||
[[builtin(position)]] clip_position: vec4<f32>;
|
||||
[[location(0)]] color: vec3<f32>;
|
||||
@builtin(position) clip_position: vec4<f32>,
|
||||
@location(0) color: vec3<f32>,
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
@stage(vertex)
|
||||
fn vs_main(
|
||||
model: VertexInput,
|
||||
) -> VertexOutput {
|
||||
@ -22,7 +22,7 @@ fn vs_main(
|
||||
|
||||
// Fragment
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fs_main(in: VertexOutput) -> [[location(0)]] vec4<f32> {
|
||||
@stage(fragment)
|
||||
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
|
||||
return vec4<f32>(in.color, 1.0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user