Blacksite/third_party/transform-gizmo-bevy/src/gizmo.wgsl
Rbanh f29712d158
Some checks are pending
CI / Format, lint, test, build (push) Waiting to run
Initial project import
2026-06-05 21:44:45 -04:00

32 lines
641 B
WebGPU Shading Language

struct VertexInput {
@location(0) position: vec2<f32>,
@location(1) color: vec4<f32>,
};
struct VertexOutput {
@builtin(position) clip_position: vec4<f32>,
@location(0) color: vec4<f32>,
};
@vertex
fn vertex(vertex: VertexInput) -> VertexOutput {
var position = vec4(vertex.position.x, -vertex.position.y, 0.5, 1.0);
var color = vertex.color;
return VertexOutput(position, color);
}
struct FragmentInput {
@location(0) color: vec4<f32>,
};
struct FragmentOutput {
@location(0) color: vec4<f32>,
};
@fragment
fn fragment(in: FragmentInput) -> FragmentOutput {
return FragmentOutput(in.color);
}