AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb

[BUG] NanoVDB viewer fails to render with OpenCL/OpenGL backends

Open
#1,631 3 comments 1 reaction 0 assignees View on GitHub
bug nanovdb
Dominant language
C++
Stars
3.4k
Forks
774
Avg merge
3d 9h
Merged PRs (30d)
34

Description

### Environment
**Operating System:** Windows 11
**Version / Commit SHA:** VDB 8.1.1, SHA: 4a186c2
**Other:** MSVC 19.29.30148.0, C++11

### Describe the bug
The NanoVDB viewer failed to render correctly with OpenCL or OpenGL selected as the backend (but CUDA worked)
- For fog volumes, an elongated cuboid was drawn.
![image](https://github.com/AcademySoftwareFoundation/openvdb/assets/29355340/59e5abe0-8f6b-4afc-bd10-a310d4fa6872)
![image](https://github.com/AcademySoftwareFoundation/openvdb/assets/29355340/489e8df6-84be-4e21-857d-f11cd245ee4e)
- For level sets, only the background checkerboard pattern was drawn.
- For points, there's nothing but a blank screen.

### To Reproduce
1. Build NanoVDB with
```
cmake -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake `
-DUSE_NANOVDB=ON -DOPENVDB_BUILD_CORE=OFF -DOPENVDB_BUILD_BINARIES=OFF -DOPENVDB_ROOT='C:\Program Files (x86)\OpenVDB' `
-DNANOVDB_BUILD_EXAMPLES=ON -DNANOVDB_USE_INTRINSICS=ON `
-DNANOVDB_USE_OPENVDB=ON -DNANOVDB_USE_TBB=ON -DNANOVDB_USE_GLFW=ON -DNANOVDB_USE_NATIVEFILEDIALOG=ON `
-DNANOVDB_USE_CUDA=ON -DNANOVDB_CUDA_KEEP_PTX=ON `
-DNANOVDB_BUILD_UNITTESTS=OFF -DNANOVDB_BUILD_BENCHMARK=OFF DNANOVDB_USE_MAGICAVOXEL=OFF ..
cmake --build . --parallel 4 --config Release --target install
```
2. Run the NanoVDB viewer and load a grid.
3. Switch the backend to OpenCL or OpenGL
4. See error

### Expected behavior
Correct rendering of the NanoVDB grids should appear.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the supplied CMake configuration, Windows environment, and NanoVDB viewer, then compare rendering behavior across CUDA, OpenCL, and OpenGL backends. Done means fog volumes, level sets, and points render correctly when OpenCL or OpenGL is selected.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.