mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-28 09:09:19 +01:00
Makes the dual source implementation in wgpu WebGPU spec compliant. Furthermore, makes the dual source blending extension available when targeting WebGPU.
11 lines
300 B
WebGPU Shading Language
11 lines
300 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>,
|
|
}
|
|
|
|
@fragment
|
|
fn main() -> FragmentOutput {
|
|
return FragmentOutput(vec4<f32>(0.4f, 0.3f, 0.2f, 0.1f), vec4<f32>(0.9f, 0.8f, 0.7f, 0.6f));
|
|
}
|