Conversation
|
Thanks. This I can handle better. |
|
I see what you mean. It is even visible without setting pt_num_bounces. I think it's going to be difficult to track this one down. |
Hmm, I can notice a slight amount there. Though that might just the "unavoidable" minimum that occurs while not many samples have been accumulated yet. Also, we have two generally working but, evidently, slightly differently behaving versions... maybe we can figure something out with the help of the differences. |
|
I haven't got much time the next couple of days. But for your convenience I've made a diff between the restir branch and this PR. |
|
My average C++ knowledge is, unfortunately, not sufficient to solve the smearing issue. I hope that @res2k finds the time to take a look at this. |
|
Thanks for working on this, @res2k and @abalfoort! I took a quick look, and I'm generally not opposed to these changes, but they need some polishing. Most importantly, the new lighting pass needs to play well with the denoiser, and currently it doesn't. Even in the starting location of I should be able to help you with these issues, but for that I need to allocate some time and take a closer look. |
Indeed. One thing I noticed, when using Nsight Graphics, is that the "reservoir" pixels (on
Hmm, notable differences in light selection for ReSTIR:
Could those differences be relevant?
Thanks, your suggestions and input are appreciated! |
|
Just to verify if it makes any change at all I set |
|
Prodding around I noticed that disabling the use of the "previous reservoir" seemed to fix the smear (in exchange for more noise). |
|
I tried it (on Debian 12) and I think you really have to look hard to see any "smear" with this commit. For me this PR is ready to merge. |
|
Holidays are over and I've been testing the MPs with this PR. |
Uh, not sure what "the MPs" means? Could you expand the acronym? |
|
Ah, sorry, MP=Mission Pack. |
|
Sorry for accidental cross-reference, I though I had removed it during rebase. |
|
Is there any progress on this change or is it not worth the effort? |
|
No progress from my side. |
|
No progress since my last changes to this, either. |
|
Ah, well thanks for the update. |
|
I have been playing with these latest commits. The smearing was gone. Sometimes I had some FPS drops but that might be my older GPU (RTX 3060). |
|
@res2k How do you test the demos? I know how to use |
Benchmark script to run multiple demos a number of times: #!/bin/sh
NUM_RUNS=5
while [[ $# -gt 0 ]]; do
case $1 in
-r|--runs)
NUM_RUNS=$2
shift # past argument
shift # past value
;;
-*|--*)
echo "Unknown option $1"
exit 1
;;
*)
break
;;
esac
done
for demo in $*; do
echo "$demo:"
./q2rtx.exe +timedemo $NUM_RUNS +set nextserver quit +demo $demo | grep fps
echo
done |
|
Thanks. I had to adapt the script a bit, but it helped a lot. pt_restir 0
pt_restir 1
Hardly any difference. |
Hi, some notes:
|
|
So, it is preferred to calculate the milliseconds per frame, exclude the minimum and maximum values of these calculated values and finally calculate the average milliseconds per frame value for each demo. Correct? |
[EDIT]
|
Hmm, that's an outside/skylit location, that may be related. What happens if you disable indirect lighting? Also, do you recall what map/location that was? |
|
It is map city1 (Outer Courts). |
I guess you do this by setting pt_indirect_polygon_lights and pt_indirect_dyn_lights to "0"? |
|
|
That one does not exist, but |
|
Did nobody notice the fact that it is "fake ReSTIR"? Or did I misunderstand Zyanides work and the concept of ReSTIR here. Reason I say so is, I've noticed that it greatly reduces the sharpness and thus visibility of shadows. Aside from the obvious smear problem. (It is originally based on this article, which even calls it ReSTIR el Cheapo lol. http://www.zyanidelab.com/restir-el-cheapo/ ) |
It's not "fake", it's still ReSTIR, just that in "cheapo" mode not everything is done per-pixel.
Note that it may not (just) be ReSTIR; in some cases, when lighting is from bounce lights only (usually sky lighting; "bound only" lighting is actually the default unless poly lights are explicitly created for sky polys), some smearing is more prominently visible. |
|
The project is discontinued; no new features will be implemented here. Closing. |




This adds ReSTIR light sampling, based on https://github.com/zyanidelab/Q2RTX.
It's essentially #475 but some additional flourishes:
I also tried if having separate shaders for ReSTIR vs RIS makes any difference - but it didn't seem to significantly impact performance, so I kept things as they were originally.
Visuals:
q2dm5,(-605.3, -310.2, 430.2) (0.999, -0.041, -0.026)is one such spot.)Performance:
I measured frametimes using the timedemos
crusher,demo1,demo2on a 5070 TI at 3800x2000 and a 3070 Laptop at 2560x1600.pt_num_bounceswas set to0.5070 TI:
masterbranch frametimept_restir 1masterpt_restir 0master3070 Laptop:
masterbranch frametimept_restir 1masterpt_restir 0masterSince we're dealing with frametimes, lower is better.
My thoughts:
Performance-wise, there's no issue (not much of a change compared to the current light sampling), and visually, it really helps in some previously noisy areas - so it would be a clear win if there wasn't the increase of "dark smearing" being observed. (Personally, I find the smearing more distracting than the noise issues, mainly because the smearing occurs constantly, while the current light sampling is decently tuned for the Q2 content and noise is not visible that often.) So it's a bit of a "so-so" right now.
But hopefully the smearing can be addressed, though I didn't look into that yet.