Volume rendering, implemented in Unity3D. Want to support the project? Donate a small sum to Save The Children(https://www.savethechildren.net/) or another charity, and send me a message, and I will be greatly motivated!
Early return optimisation for volume rendering with tricubic interpolation + adjustable sampling rate multiplier
Two changes:
Optimised volume rendering tricubic interpolation
We now fetch the density value without tricubic interpolation first, to see if we can do an early return.
This has a minimal cost, but for transfer functions where the lowest density values are mapped to zero then the performance benefit is great (up to 2-3 times faster).
Sampling rate multiplier setting
Previously I've advised users on very low-end devices (or AR) to modify the "MAX_NUM_STEPS" values in the shader directly, to improve rendering performance at the cost of visual quality. Now there's a setting for this:
Early return optimisation for volume rendering with tricubic interpolation + adjustable sampling rate multiplier
Two changes:
Optimised volume rendering tricubic interpolation
We now fetch the density value without tricubic interpolation first, to see if we can do an early return.
This has a minimal cost, but for transfer functions where the lowest density values are mapped to zero then the performance benefit is great (up to 2-3 times faster).
Sampling rate multiplier setting
Previously I've advised users on very low-end devices (or AR) to modify the "MAX_NUM_STEPS" values in the shader directly, to improve rendering performance at the cost of visual quality. Now there's a setting for this: