mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-01-09 14:48:08 -05:00
* Basic implementation of `clip_distances` for Vulkan and GL backends * Added GPU test for `clip-distances` * Update feature array size * Add changelog entry * Validate `clip_distances` array size * Check for `clip_distances` enable directive * Consolidate code for generating `enable` directives in WGSL backend and add `clip_distances`.
24 lines
485 B
WebGPU Shading Language
24 lines
485 B
WebGPU Shading Language
enable dual_source_blending;
|
|
|
|
struct FragmentOutput {
|
|
@location(0) @blend_src(0) output0_: vec4<f32>,
|
|
@location(0) @blend_src(1) output1_: vec4<f32>,
|
|
}
|
|
|
|
var<private> output0_: vec4<f32>;
|
|
var<private> output1_: vec4<f32>;
|
|
|
|
fn main_1() {
|
|
output0_ = vec4<f32>(1f, 0f, 1f, 0f);
|
|
output1_ = vec4<f32>(0f, 1f, 0f, 1f);
|
|
return;
|
|
}
|
|
|
|
@fragment
|
|
fn main() -> FragmentOutput {
|
|
main_1();
|
|
let _e1 = output0_;
|
|
let _e3 = output1_;
|
|
return FragmentOutput(_e1, _e3);
|
|
}
|