TestGPURayCastVolumeDepthPass, why UseDepthPassOn need to GetDepthPassContourValues->SetValue ?

TestGPURayCastVolumeDepthPass, why UseDepthPassOn need to GetDepthPassContourValues->SetValue ?
try to On/Off and set different values, but saw nothing different.
Thanks

Those parameters are to enable a performance improvement in the GPU volume mapper. Usually the mapper rays start at the face of the volume closest to the camera. However, a lot of times, there are zero opacity voxels (for example, air in medical datasets is often empty space). Traversing this space for each ray is useful time lost. The depth pass is a first render pass that creates an isosurface for the dataset and subsequent frames use the isosurface as ray start positions. This way each subsequent frame is much faster.

Thanks!
what’s this used for?
volumeMapper->GetDepthPassContourValues()->SetValue(0, 50.0);

UseDepthPassOn insert a custom depth pass before the normal render pass, right? and this inserted depth pass use GetDepthPassContourValues->SetValue to set the value in the depth buffer.
eg. if set GetDepthPassContourValues->SetValue(0, 50.0), all the value in the depth buffer are fill with 50.0, right? BUT what if the normalized fload value?

@gpu Nope. The depth pass doesn’t modify the depth buffer. As I mentioned in previous message, it modifies the start depth of the rays. Using the GetDepthPassContourValues() you set the isovalue for contouring the volume in the depth pass. The isosurface resulting from the depth pass is used as the new start positions for rays in subsequent frames.

volumeMapper->UseDepthPassOn();
//volumeMapper->GetDepthPassContourValues()->SetValue(0, 50.0);//default, no effect
volumeMapper->GetDepthPassContourValues()->SetValue(0, 230.0);//test value, effect as these pictures

企业微信截图_d6f42f5c-91ec-4132-876f-9ac0d9d264f2

and normally how to decide the value set to this XXX
volumeMapper->GetDepthPassContourValues()->SetValue(0, XXX);
use the MIN of the BoundingBox is a good choice?