summary refs log tree commit diff
path: root/src/demosaic/lmmse_01_interpolate.wgsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/demosaic/lmmse_01_interpolate.wgsl')
-rw-r--r--src/demosaic/lmmse_01_interpolate.wgsl11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/demosaic/lmmse_01_interpolate.wgsl b/src/demosaic/lmmse_01_interpolate.wgsl
new file mode 100644
index 0000000..57cd328
--- /dev/null
+++ b/src/demosaic/lmmse_01_interpolate.wgsl
@@ -0,0 +1,11 @@
+@group(0) @binding(0)
+var input_tex: texture_storage_2d<r16uint, read>;
+
+@group(0) @binding(1)
+var output_tex: texture_storage_2d<rgba32float, write>;
+
+@compute @workgroup_size(8, 8)
+fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
+	let texel = textureLoad(input_tex, global_id.xy);
+	textureStore(output_tex, global_id.xy, vec4<f32>(texel) / 1024f);	
+}