Files
wgpu/naga/tests/in/wgsl/dualsource.wgsl
T
Andreas Reich fedc80eb80 [wgsl-in, wgsl-out, glsl-in] WebGPU compliant dual source blending feature (#7146)
Makes the dual source implementation in wgpu WebGPU spec compliant.
Furthermore, makes the dual source blending extension available when targeting WebGPU.
2025-03-08 21:07:37 +01:00

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));
}