Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to wgpu-native v0.14.2.3 #329

Merged
merged 20 commits into from
Jan 25, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update examples for changed wgsl syntax
almarklein committed Jan 20, 2023
commit 0238c8043a039039694c99fb960d36035264d309
2 changes: 1 addition & 1 deletion examples/compute_noop.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
@group(0) @binding(1)
var<storage,read_write> data2: array<i32>;
@stage(compute)
@compute
@workgroup_size(1)
fn main(@builtin(global_invocation_id) index: vec3<u32>) {
let i: u32 = index.x;
5 changes: 2 additions & 3 deletions examples/cube.py
Original file line number Diff line number Diff line change
@@ -136,7 +136,6 @@
{
"offset": 0,
"bytes_per_row": texture_data.strides[0],
"rows_per_image": 0,
},
texture_size,
)
@@ -164,7 +163,7 @@
@builtin(position) pos: vec4<f32>,
};
@stage(vertex)
@vertex
fn vs_main(in: VertexInput) -> VertexOutput {
let ndc: vec4<f32> = r_locals.transform * in.pos;
var out: VertexOutput;
@@ -179,7 +178,7 @@
@group(0) @binding(2)
var r_sampler: sampler;
@stage(fragment)
@fragment
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
let value = textureSample(r_tex, r_sampler, in.texcoord).r;
let physical_color = vec3<f32>(pow(value, 2.2)); // gamma correct
4 changes: 2 additions & 2 deletions examples/triangle.py
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
@builtin(position) pos: vec4<f32>,
};
@stage(vertex)
@vertex
fn vs_main(in: VertexInput) -> VertexOutput {
var positions = array<vec2<f32>, 3>(
vec2<f32>(0.0, -0.5),
@@ -49,7 +49,7 @@
return out;
}
@stage(fragment)
@fragment
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
let physical_color = pow(in.color.rgb, vec3<f32>(2.2)); // gamma correct
return vec4<f32>(physical_color, in.color.a);