I would like to programme a volume reconstruction algorithm based on shape silhouettes with cuda. Therefore I need to reproject a voxel volume into the image planes of 6 camera views.
I plan to use 2D textures but I am not aware of how the best access pattern looks like.
If I project neighboring voxels I have locality in the projection in the image planes. Therefore using textures seems to be resonable.
I am now wondering if it is best to read each voxel once and project it into all views at once, which would result in a single memory read for each voxel, or if I should iterate 6 times over all voxels and project them into a single view only per iteration.
I think the right access pattern is related to how multiple 2D textures are cached. I have not found any description concerning caching of multiple textures in the cuda docu and hope someone can give me some advice.
If I have 6 active textures is each texture cached individually or is there one cache for all textures which is invalidated each time I access another texture? Which is the best access pattern?
Thanks for your help