Files
wgpu/tests/in/dualsource.wgsl
Frederik Magnus Johansen Vestre 0491d39232 Support dual source blending (#2427)
Co-authored-by: teoxoy <28601907+teoxoy@users.noreply.github.com>
2023-08-30 21:00:35 +02:00

12 lines
380 B
WebGPU Shading Language

/* Simple test for multiple output sources from fragment shaders */
struct FragmentOutput{
@location(0) color: vec4<f32>,
@location(0) @second_blend_source mask: vec4<f32>,
}
@fragment
fn main(@builtin(position) position: vec4<f32>) -> FragmentOutput {
var color = vec4(0.4,0.3,0.2,0.1);
var mask = vec4(0.9,0.8,0.7,0.6);
return FragmentOutput(color, mask);
}