// Placeholder compute shader — stands in for the develop pipeline. // // Its only job is to prove the path: a compute shader writes a storage // texture, and that texture reaches the screen without a CPU round-trip // (ARCH §6.1). Replaced by real pipeline stages in v0.2. struct Params { width: u32, height: u32, // Animates so it is visually obvious the compute pass runs every frame // rather than a stale texture being redisplayed. phase: f32, _pad: f32, } @group(0) @binding(0) var output: texture_storage_2d; @group(0) @binding(1) var params: Params; @compute @workgroup_size(8, 8, 1) fn main(@builtin(global_invocation_id) gid: vec3) { if (gid.x >= params.width || gid.y >= params.height) { return; } let uv = vec2( f32(gid.x) / f32(params.width), f32(gid.y) / f32(params.height), ); // Warm dark ground with a moving highlight — deliberately unlike a test // pattern, so a stuck frame is obvious at a glance. let d = distance(uv, vec2(0.5 + 0.25 * cos(params.phase), 0.5 + 0.25 * sin(params.phase))); let glow = 1.0 - smoothstep(0.0, 0.55, d); let base = vec3(0.08, 0.07, 0.06); let accent = vec3(0.69, 0.23, 0.15); let rgb = base + accent * glow * (0.35 + 0.65 * uv.y); textureStore(output, vec2(gid.xy), vec4(rgb, 1.0)); }