mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 19:01:24 +00:00
Change-Id: I7f69de9c3b6fe226e0688f56a8d076dc6ec4a81f Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55281 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
21 lines
338 B
WebGPU Shading Language
21 lines
338 B
WebGPU Shading Language
struct VertexOutput {
|
|
[[builtin(position)]]
|
|
pos : vec4<f32>;
|
|
[[location(0)]]
|
|
loc0 : i32;
|
|
};
|
|
|
|
fn foo(x : f32) -> VertexOutput {
|
|
return VertexOutput(vec4<f32>(x, x, x, 1.0), 42);
|
|
}
|
|
|
|
[[stage(vertex)]]
|
|
fn vert_main1() -> VertexOutput {
|
|
return foo(0.5);
|
|
}
|
|
|
|
[[stage(vertex)]]
|
|
fn vert_main2() -> VertexOutput {
|
|
return foo(0.25);
|
|
}
|