Cleaned up namespaces re: PR comments.
This commit is contained in:
parent
bb8d46a3fd
commit
c4565759e4
13 changed files with 158 additions and 161 deletions
17
wgpu/src/shader/solid.wgsl
Normal file
17
wgpu/src/shader/solid.wgsl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
struct Uniforms {
|
||||
transform: mat4x4<f32>,
|
||||
color: vec4<f32>
|
||||
}
|
||||
|
||||
@group(0) @binding(0)
|
||||
var<uniform> uniforms: Uniforms;
|
||||
|
||||
@vertex
|
||||
fn vs_main(@location(0) input: vec2<f32>) -> @builtin(position) vec4<f32> {
|
||||
return uniforms.transform * vec4<f32>(input.xy, 0.0, 1.0);
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fs_main() -> @location(0) vec4<f32> {
|
||||
return uniforms.color;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue