Skip to content

Correct terminal intervals in volume rendering - #225

Open
sylvesterkaczmarek wants to merge 2 commits into
google-research:mainfrom
sylvesterkaczmarek:fix-volume-rendering-terminal-interval
Open

sylvesterkaczmarek wants to merge 2 commits into
google-research:mainfrom
sylvesterkaczmarek:fix-volume-rendering-terminal-interval

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

For nonuniform sample depths, volume_rendering reuses the first gap at the far endpoint. For depths [0, 1, 4], this produces intervals [1, 2, 2] instead of [1, 2, 3], changing the final sample's opacity, rendered values, and depth.

Use the adjacent final gap instead. Update the existing test fixture and add independent numerical regressions covering increasing/decreasing spacing, uniform and two-sample controls, batched rays, JIT, and opaque_final_sample.

Validation: python -m pytest -q jax3d/math/volume_rendering_test.py passes all 71 tests. Eight nonuniform regression cases fail on unchanged upstream; the eight control cases already pass. Syntax compilation and git diff --check also pass.

@sylvesterkaczmarek

Copy link
Copy Markdown
Author

Any feedback on the volume-rendering endpoint correction? The workflow is still waiting for maintainer approval.

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