I’m trying to direct volume render a medical scan in VisionOS with Metal, and I encounter these banding and dark spotting artifacts.
I first suspected that these were caused by gradient estimation and therefore tried 26 neighbor and naive spherical approximation in addition to 6 neighbor finite difference gradient estimation. The artifacts are visible in all 3 cases.
I am also including normal visualizations for both 3 cases and renders for a synthetic sphere volume.
The fact that the banding is still visible even in the naive spherical approximation leads me to believe that the primary reason is not gradient estimation.
I now believe that these are caused by lighting or color compositing, as setting transfer function to return a single color for all densities produces a smooth surface.
Same algorithm and transfer function produces smooth surfaces in Unity.
I need help in removing these artifacts.