// Rainbow Shader struct VertexOutput { @builtin(position) clip_position: vec4, @location(0) tex: vec2, @location(1) sprite: vec2 } struct Times { @size(8) total_time: f32, @size(8) delta_time: f32 } @group(1) @binding(0) var total_time: Times; @fragment fn main(in: VertexOutput) -> @location(0) vec4 { let col = 0.5 + 0.5*cos(total_time.total_time+in.tex.xyx+vec3(0.0,2.0,4.0)); return vec4(col.xyz, 1.0); }