gameknife / gkNextRenderer

A Modern gkRenderer
15 stars 2 forks source link

faster deghosting. show current pass in UI #10

Closed tigrazone closed 2 weeks ago

gameknife commented 2 weeks ago

I already remove the "reset accumulation", reproject always accumulate the past N frames, not accumulation from a point. And this renderer is targeting realtime rendering, the render result should be ok when camera moving.

tigrazone commented 2 weeks ago

I'm understand your targeting but is it real to combine accumulation and reprojection? When camera move I want to use reprojection but after of temporal frames I want to use accumulation for better quality using samples, not dienoisers. Is it real to implement it?

tigrazone commented 2 weeks ago

When I rewrite https://github.com/tigrazone/gkNextRenderer/blob/89874c0fb3af386ed685cc2985ca2c040cebd073/assets/shaders/RayTracing.rgen#L202 imageStore(AccumulationImage, ipos, vec4(pixelColor, 0)); like this

    uint TemporalFrames = max(1, Camera.TemporalFrames);
    if(Camera.frameNum > TemporalFrames) {
    precise vec4 prevPixelColor = imageLoad(AccumulationImage, ipos);
    prevPixelColor += vec4(pixelColor, 0);
    imageStore(AccumulationImage, ipos, prevPixelColor);
    } else {
    imageStore(AccumulationImage, ipos, vec4(pixelColor, 0) * (Camera.frameNum + 1));
    }

and https://github.com/tigrazone/gkNextRenderer/blob/89874c0fb3af386ed685cc2985ca2c040cebd073/assets/shaders/Accumulate.comp#L24 vec4 src = imageLoad(NewSourceImage, ipos); with vec4 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