Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(volume-rendering): correct data access for histogram in volume rendering with unequal chunk sizes #632

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

seankmartin
Copy link
Contributor

@seankmartin seankmartin commented Aug 2, 2024

Included also in #614 as changes along these lines are needed for that PR.

The histogram computation in volume rendering has been fixed for unequal chunk sizes to both:

  1. Pass the correct chunk size to the data sampling shader per chunk
  2. Distribute the total number of samples for the histogram according to the percentage of the total chunk volume that each chunk takes up. E.g. with 1k samples overall, total chunk volume of 10k voxels, and a single chunk with 1k voxels, we would aim to obtain 100 random samples from that chunk for the histogram. While for a chunk with 300 voxels, we would aim for 30 random samples from that chunk for the histogram.

In addition, the 3D histogram calculation no longer discards values at exactly 0 after invlerp. The previous behaviour was due to mistaking the above problem with unequal chunk sizes for a different error.

@seankmartin seankmartin marked this pull request as ready for review August 2, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant