AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb
NanoVDB viewer CUDA and GLSL results do not match
- Dominant language
- C++
- Stars
- 3.4k
- Forks
- 774
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 34
Description
I noticed a mismatch of voxel positions in the rendered results of arbitrary fog volume using CUDA and GLSL backend. So I looked into the problem and found some disagreements in their implementations.
1. In renderFogVolume.c the ray is clipped by a bbox with [root.mBBox_min, root.mBBox_max]. However in CUDA implementation it is clipped by a bbox with [root.mBBox_min, root.mBBox_max + 1].
2. The neareset sampler is floor() in renderFogVolume.c but round() in CUDA implementation.
After I matched the two differences above, the voxel positions matches. But the fog volume rendered by GLSL is still brighter than by CUDA, both of which using seemingly the same set of parameters.
Contributor guide
Research direction
Start by comparing renderFogVolume.c with the CUDA implementation, focusing on the bounding-box clipping and nearest-sampler behavior described in the issue. Then investigate why the GLSL fog volume remains brighter when both backends use the same parameters. Done means matching voxel positions and resolving the remaining rendering brightness difference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100