fixed taa on dx12

This commit is contained in:
Mikulas Florek 2023-09-21 23:10:18 +02:00
parent 96e2c56f11
commit b7763a6075
2 changed files with 3 additions and 4 deletions

View file

@ -478,7 +478,7 @@ local function TAA(res, gbuffer)
setRenderTargets()
drawcallUniforms(viewport_w, viewport_h, 0, 0)
bindTextures({taa_history, gbuffer.DS, res, gbuffer.D}, 0)
bindTextures({taa_history, res, gbuffer.D}, 0)
bindImageTexture(taa_tmp, 3)
dispatch(taa_shader, (viewport_w + 15) / 16, (viewport_h + 15) / 16, 1)

View file

@ -7,9 +7,8 @@ compute_shader [[
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
layout (binding = 0) uniform sampler2D u_history;
layout (binding = 1) uniform sampler2D u_depthbuf;
layout (binding = 2) uniform sampler2D u_current;
layout (binding = 3) uniform sampler2D u_motion_vectors;
layout (binding = 1) uniform sampler2D u_current;
layout (binding = 2) uniform sampler2D u_motion_vectors;
layout (rgba8, binding = 3) uniform image2D u_output;
// https://gist.github.com/TheRealMJP/c83b8c0f46b63f3a88a5986f4fa982b1