mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 16:31:11 +01:00
11 lines
228 B
WebGPU Shading Language
11 lines
228 B
WebGPU Shading Language
fn splat() -> vec4<f32> {
|
|
let a = (1.0 + vec2<f32>(2.0) - 3.0) / 4.0;
|
|
let b = vec4<i32>(5) % 2;
|
|
return a.xyxy + vec4<f32>(b);
|
|
}
|
|
|
|
fn unary() -> i32 {
|
|
let a = 1;
|
|
if (!true) { return a; } else { return ~a; };
|
|
}
|