From b5ced3af46c96ceb959fbbf1addfeba3bd4f76d5 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Wed, 15 Apr 2026 16:53:58 -0400 Subject: first commit. working body rendering --- assets/shaders/canvas.wgsl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 assets/shaders/canvas.wgsl (limited to 'assets/shaders/canvas.wgsl') diff --git a/assets/shaders/canvas.wgsl b/assets/shaders/canvas.wgsl new file mode 100644 index 0000000..3be1a77 --- /dev/null +++ b/assets/shaders/canvas.wgsl @@ -0,0 +1,32 @@ +struct VertexInput { + @location(0) position: vec3, + @location(1) uv: vec2 +}; + +struct VertexOutput { + @builtin(position) clip_position: vec4, + @location(0) uv: vec2 +}; + +@vertex +fn vs_main( + model: VertexInput, +) -> VertexOutput { + var out: VertexOutput; + + out.clip_position = vec4(model.position, 1.0); + out.uv = model.uv; + + return out; +} + +@group(0) @binding(0) +var canvas_texture: texture_2d; +@group(0) @binding(1) +var canvas_sampler: sampler; + +@fragment +fn fs_main(in: VertexOutput +) -> @location(0) vec4 { + return textureSample(canvas_texture, canvas_sampler, in.uv); +} -- cgit v1.2.3