// Simple UV gradient shader (vertex + fragment) struct VertexInput { @location(0) position: vec3, @location(1) uv: vec2, } struct VertexOutput { @builtin(position) clip_position: vec4, @location(0) uv: vec2, } @vertex fn vertex(in: VertexInput) -> VertexOutput { var out: VertexOutput; // assume incoming positions are in clip-space (vec3 with z, or model-transformed) out.clip_position = vec4(in.position, 1.0); out.uv = in.uv; return out; } @fragment fn fragment(in: VertexOutput) -> @location(0) vec4 { // very simple vertical gradient between two colors let bottom = vec3(1.0, 0.8, 0.2); // warm let top = vec3(0.2, 0.6, 1.0); // cool let color = mix(bottom, top, in.uv.y); return vec4(color, 1.0); }