Making some more progress: I think this is the place to change the limits on 3D texture dimensions SWR_MAX_TEXTURE_3D_LEVELS
:
I changed the value from 12 to 14, assuming it would provide 8K textures size.
This worked up to a point. I can resample the MRhead to 2560x2560x130 (4.7GB) and it does render. At which point the rendering speed is acceptable (i get around 3fps) and much better than CpuRaycasting, which I can’t even move interactively, and also GPU rendering quality is better.
GPU Raycasting:
CPU Raycasting:
However, when I go to 2560x2560x270 (~3.8GB) in MRHead, Slicer crashes without an error. This seems related to texture memory limit, more than the dimension, since it works fine when I keep the volume dimensions the same but cast the data type as unsigned char instead of short.
There is also this SWR_MAX_TEXTURE_SIZE
setting which seems relevant:
I tried modifying it to be 4096^3, but it still doesn’t seem to make a difference.
This is as far as I can troubleshoot. Someone who know openGL and C++ needs to dig deeper.