Closed kd-11 closed 2 years ago
PS. I made the dst access/stage more general because the autobuffers can be used for different purposes. If they are guaranteed to only be used as uniform data for RT I can change that.
Tested and seems to fix as described. See https://github.com/sultim-t/prboom-plus-rt/issues/38#issuecomment-1101518354
This caused a data hazard with bizzare side-effects. Basically the results of the traceRay operation yielded different results that calculating the hit manually using barycentric coordinates because the vertex lookup relies on uniform buffers which were not yet initialized with the current frame data. This would lead to the access returning values from the previous frame(s) - sometimes several frames old - which in turn corrupted the motion vectors and created the hallucinated artifacts in the denoiser. This fix completely solves https://github.com/sultim-t/prboom-plus-rt/issues/38 for me. The crashing is also gone, I played most of episode one in a single sitting with no crashes observed. Hopefully it is fixed for others as well.