Hi,
I currently trying to implement a sparse voxelization technique without an explicit octree on the gpu. I want to use the sparse voxelization for global illumination later on (idea based on SVOGI, of course). To avoid the GPU octree (to skip building it and the traversal for cone tracing) I want to utilize the ARB_sparse_texture extension: I think the concept is not really new (I’ve read about it), It should be theoretical doable, but I have a practical problem with some undocumented API restriction.
First of all my current idea (please hint me any misunderstandings on my side):
[ul]
[li] create a sparse 3D texture for full resolution voxelization of the scene
[/li][li] create a virtual-page mask (also 3D) with num-pages-x, num-pages-y, num-pages-z dimension
[/li][li] 1-pass voxelize scene into the virtual page mask to mark pages as in
[/li][li] map virtual page mask in cpu space, iterate over it and commit pages for the full resolution voxelization
[/li][li] 1-pass voxelization again with full resolution into the sparse texture
[/li][li]
[/li][/ul]
I hope the concept is clear. Now my practical problem. I have success with the normal 1-pass voxelization but when i start to make use of the ARB_sparse_texture extension and set the full resolution texture to sparse I bumped into this API error:
major api error 1282: GL_INVALID_OPERATION error generated. Image lookups are not supported for tiles with depth > 1. Please use tile dimension where tile depth is 1.
glGetError(glBindImageTexture) = GL_INVALID_OPERATION
Sadly this restriction isn’t anywhere documented (or?) not even in the spec. The problem is, for the 1-pass voxelization, I have to use gimage3D for example to store my voxels directly into the texture. But it seems this starts to be impossible with sparse textures.
But maybe I missed something? Or is it a restriction of my system? Or has anyone a workaround for it? I’ve run out of options at the moment.
Additionally, it’s really interesting that there are some blog posts out there describing a similar technique and the use of sparse textures for octree-less voxelization. 1
My system:
“vendor: NVIDIA Corporation”
“renderer: GeForce GTX 570/PCIe/SSE2”
“version: 4.4.0”
“glsl: 4.40”