NVIDIA / gvdb-voxels

Sparse volume compute and rendering on NVIDIA GPUs
Other
673 stars 144 forks source link

Strange behaviour of SetModule(CUModule) #45

Closed drmateo closed 5 years ago

drmateo commented 5 years ago

I have a custom module which use macros like SCN_WIDTH and VBOX so to be able to use this information in my kernels I set up the new module. The problem come here, the processing of data in these custom kernel is good but now the visualizer provided with GVDB starts to do strange thinks, like the atlas information is not transforming according with the camera transformation. I've attached an image to better understanding. As can you see, the topology has change according with the camera transformation, but the data which came from the atlas is frozen.

screenshot from 2018-12-20 18-43-04

I guess that the problem is because when you set a new module the scene information is just being updating in the custom module but not in the default one. Am I right? Or any other suggestion?

drmateo commented 5 years ago

Again, I'll respond myself. The error came from an incorrect loaded of corresponding cuda module. That is, if you load a custom module to compute a kernel and late you want to use a kernel located in the default Module, it should be load the default module just before the execution of that kernel by

gvdb.SetModule();