Cycles: Add half precision float support for volumes with NanoVDB
This patch makes it possible to change the precision with which to store volume data in the NanoVDB data structure (as float, half, or using variable bit quantization) via the previously unused precision field in the volume data block. It makes it possible to further reduce memory usage during rendering, at a slight cost to the visual detail of a volume. Differential Revision: https://developer.blender.org/D10023
This commit is contained in:
@@ -1084,7 +1084,9 @@ void CUDADevice::tex_alloc(device_texture &mem)
|
||||
need_texture_info = true;
|
||||
|
||||
if (mem.info.data_type != IMAGE_DATA_TYPE_NANOVDB_FLOAT &&
|
||||
mem.info.data_type != IMAGE_DATA_TYPE_NANOVDB_FLOAT3) {
|
||||
mem.info.data_type != IMAGE_DATA_TYPE_NANOVDB_FLOAT3 &&
|
||||
mem.info.data_type != IMAGE_DATA_TYPE_NANOVDB_FPN &&
|
||||
mem.info.data_type != IMAGE_DATA_TYPE_NANOVDB_FP16) {
|
||||
CUDA_RESOURCE_DESC resDesc;
|
||||
memset(&resDesc, 0, sizeof(resDesc));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user