// Shadow map depth-only vertex shader.
struct ShadowUniforms {
light_view_proj: mat4x4<f32>,
model: mat4x4<f32>,
}
@group(0) @binding(0)
var<uniform> shadow: ShadowUniforms;
struct VertexInput {
@location(0) position: vec3<f32>,
@location(1) normal: vec3<f32>,
@location(2) tex_coords: vec2<f32>,
@location(3) color: vec4<f32>,
}
@vertex
fn vs_main(in: VertexInput) -> @builtin(position) vec4<f32> {
let world_pos = shadow.model * vec4<f32>(in.position, 1.0);
return shadow.light_view_proj * world_pos;
}