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