diff --git a/assets/shaders/image_recolor.wgsl b/assets/shaders/image_recolor.wgsl new file mode 100644 index 0000000..b01c614 --- /dev/null +++ b/assets/shaders/image_recolor.wgsl @@ -0,0 +1,12 @@ +@group(0) @binding(0) var output: texture_storage_2d; + +@compute @workgroup_size(8, 8, 1) +fn compute(@builtin(global_invocation_id) global_id: vec3) { + let img_coord = vec2(global_id.xy); + let img_dims = textureDimensions(output); + let img_coord_frac = vec2( + f32(img_coord.x) / f32(img_dims.x), + f32(img_coord.y) / f32(img_dims.y) + ); + textureStore(output, img_coord, vec4(img_coord_frac, 1.0, 1.0)); +} \ No newline at end of file