Kyle-Zagers / Ray-Marching-alpha

Basic 3d engine with ray marching.
2 stars 0 forks source link

Approximation errors on smaller radii #4

Open kai-kawasaki opened 8 months ago

kai-kawasaki commented 8 months ago

Artifacting in multiple shadow types occurs in small-scale and sharp radii situations. I currently do not have a solution other than decreasing march size which has a significant performance hit.

kai-kawasaki commented 8 months ago

A lot of this issue has been fixed with a LOD system for the SDFs. The issue is still prevalent with more detailed objects such as fractals.

kai-kawasaki commented 8 months ago

Upon further inspection. The errors originate from generating signed distance fields using a rectangle SDF method that saves computation time by doing approximations on the corners. I will see if I can implement a more accurate rectangle SDF algorithm.