DarioSamo / sm64rt-legacy-renderer

MIT License
73 stars 7 forks source link

AMD hardware glitches around borders of geometry when several solid pieces of geometry are found by the same ray in the anyhit shader #41

Closed DarioSamo closed 3 years ago

DarioSamo commented 3 years ago

The debug views show the primary ray is clearly at fault here, and it's a possibility the sorting code itself is broken as well.

image image

DarioSamo commented 3 years ago

Probably worth testing with a lower max hit count just in case it's running into some limitation due to the buffer's size.

DarioSamo commented 3 years ago

Anton has found a workaround for this issue, although it seems more research is still pending.

https://twitter.com/antonschrein/status/1421492814161063936

DarioSamo commented 3 years ago

Placing samplers on the heap solves(instead of static samplers in the signature). looks like a compiler bug maybe - not placing static sampler load properly or something. I can send code if needed but that's a small change, just add sampler heap parameter

https://twitter.com/antonschrein/status/1421840748194959363

DarioSamo commented 3 years ago

Workaround seems to do the trick in dynamic_samplers, although no measurements if it actually impacts performance yet or a good explanation as to why the glitch happens in the first place.

DarioSamo commented 3 years ago

Fixed in dev