Closed tigrazone closed 1 week ago
it may be the half float precise issue? the accumulation value will increase to a very big number, try change the RenderImage Format to R32G32B32A32?
Thank you. It helps Changes:
rtAccumulation_.reset(new RenderImage(Device(), extent, VK_FORMAT_R32G32B32A32_SFLOAT, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_STORAGE_BIT));
rtOutput_.reset(new RenderImage(Device(), extent, format, VK_IMAGE_TILING_OPTIMAL,VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT));
rtPingPong0.reset(new RenderImage(Device(), extent, VK_FORMAT_R32G32B32A32_SFLOAT, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_STORAGE_BIT));
rtPingPong1.reset(new RenderImage(Device(), extent, VK_FORMAT_R32G32B32A32_SFLOAT, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_STORAGE_BIT));
layout(binding = 0, rgba32f) uniform image2D NewSourceImage;
layout(binding = 1, rgba32f) uniform image2D AccumulateImage;
layout(binding = 2, rgba32f) uniform image2D Accumulate1Image;
if(Camera.TotalFrames == 0 || Camera.frameNum > TemporalFrames)
https://github.com/tigrazone/gkNextRenderer/blob/89874c0fb3af386ed685cc2985ca2c040cebd073/assets/shaders/Accumulate.comp#L87
my result is https://www.youtube.com/watch?v=0pF5xQCOzdA no denoiser but quality of picture is good. and convolve without blinking noise now
When I rewrite https://github.com/tigrazone/gkNextRenderer/blob/89874c0fb3af386ed685cc2985ca2c040cebd073/assets/shaders/RayTracing.rgen#L202
imageStore(AccumulationImage, ipos, vec4(pixelColor, 0));
like thisand https://github.com/tigrazone/gkNextRenderer/blob/89874c0fb3af386ed685cc2985ca2c040cebd073/assets/shaders/Accumulate.comp#L24
vec4 src = imageLoad(NewSourceImage, ipos);
withvec4 src = imageLoad(NewSourceImage, ipos) / float(Camera.frameNum + 1)
;Then image in time darker and grayed... Something works wrong. Take a look https://www.youtube.com/watch?v=o7QfF9HBkxI Maybe you know how to implement it better
Originally posted by @tigrazone in https://github.com/gameknife/gkNextRenderer/issues/10#issuecomment-2183774798