mirror of
https://github.com/sotrh/learn-wgpu.git
synced 2024-11-18 03:25:33 +00:00
18 lines
288 B
WebGPU Shading Language
18 lines
288 B
WebGPU Shading Language
struct FragmentOutput {
|
|
[[location(0)]] fColor: vec4<f32>;
|
|
};
|
|
|
|
var<private> fColor: vec4<f32>;
|
|
|
|
fn main1() {
|
|
fColor = vec4<f32>(f32(1));
|
|
return;
|
|
}
|
|
|
|
[[stage(fragment)]]
|
|
fn main() -> FragmentOutput {
|
|
main1();
|
|
let e3: vec4<f32> = fColor;
|
|
return FragmentOutput(e3);
|
|
}
|