@group(0) @binding(0) var currentFrame : texture_2d; @group(0) @binding(1) var historyFrame : texture_2d; @group(0) @binding(2) var mySampler : sampler; @group(0) @binding(3) var blendAmount : f32; struct VertexOutput { @builtin(position) position : vec4, @location(0) uv : vec2, }; @vertex fn vertexMain(@location(0) position: vec3, @location(1) uv: vec2) -> VertexOutput { var out: VertexOutput; out.position = vec4(position, 1.0); out.uv = uv; return out; } @fragment fn fragmentMain(@location(0) uv: vec2) -> @location(0) vec4 { let current = textureSample(currentFrame, mySampler, uv); let history = textureSample(historyFrame, mySampler, uv); return mix(current, history, blendAmount); }