allen-cell-animated / volume-viewer

https://allen-cell-animated.github.io/volume-viewer/
Other
90 stars 7 forks source link

allow nearest-neighbor voxel interpolation #62

Closed toloudis closed 1 year ago

toloudis commented 2 years ago

Use Case

"the option to toggle voxel interpolation like in napari" - voxels either blend/interpolate into their neighbors or they have hard edges.

Solution

A render setting toggle switch.
implementation: Volume Texture sampling switches from linear to nearest. There is part of one shader that will probably have to do some different math too (new uniform var to configure it).

toloudis commented 1 year ago

in single slice mode remove the random ray offset and see if it looks fine. if the shader can know it's a single slice mode then we can skip some of the interpolation or even write a new shader to handle things