mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-29 01:23:57 +01:00
Makes the dual source implementation in wgpu WebGPU spec compliant. Furthermore, makes the dual source blending extension available when targeting WebGPU.
12 lines
274 B
WebGPU Shading Language
12 lines
274 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(0.4,0.3,0.2,0.1), vec4(0.9,0.8,0.7,0.6));
|
|
}
|