Files
wsg/assets/shaders/basic_shader.wgsl
T
Jérôme Bousquié d1b499570a début renderer
2026-07-04 20:59:25 +02:00

21 lines
436 B
WebGPU Shading Language

//! # Basic Shader Module
struct VertexInput {
@location(0) position: vec3<f32>,
};
struct VertexOutput {
@builtin(position) clip_position: vec4<f32>,
};
@vertex
fn vs_main(model: VertexInput) -> VertexOutput {
var out: VertexOutput;
out.clip_position = vec4<f32>(model.position, 1.0);
return out;
}
@fragment
fn fs_main() -> @location(0) vec4<f32> {
return vec4<f32>(1.0, 0.5, 0.2, 1.0); // Couleur orange
}