To get more realistic rendering, you can optionally enable shadow volumes.
This can be enabled from the VolumeRenderedObject inspector in the editor, or by adding a ShadowVolumeManager
component:
A shadow volume 3D texture is generated for the whole dataset. A compute shader is repsonsible for updating the shadow volume, by casting rays from the light source through the dataset, and storing information about shadows. Since this can take a long time, and async compute is not available on all platforms, the shadow volume manager divides the shadow volume into smaller chunks, and updates one chunk every frame.
Because of the extra work of computing the shadow volume (compute shader) and the extra texture lookups during volume rendreing, this can have a bad impact on performance.
There are luckily some ways to work around this, at least on desktop applications (Windows, Linux, etc.).
- If you're using HDRP: Enable DLSS and reduce the render scale.
- If you're using URP: Enable FidelityFX Super Resolution and reduce the render scale.
This works by rendering to a smaller render target (which is usually the bottleneck during volume rendering) and then doing "magic" upscaling on the rendered image.