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

Evaluate ray step size on ray cast rendering. #59

Open
kmilo9999 opened this issue May 27, 2022 · 0 comments
Open

Evaluate ray step size on ray cast rendering. #59

kmilo9999 opened this issue May 27, 2022 · 0 comments

Comments

@kmilo9999
Copy link
Contributor

Previous implementations made a correlation between the ray step size and the number of slices in the volume (how fast the ray should penetrate the volume). This was causing artifacts at the moment of clipping the volume on different axis. Some slices changes from valid data to zero too quick, making the ray stopping its march too soon.
To compensate for this, the step size was changed to a constant value (0.01). Maybe future data will need the step size depending on the number of slices.
This needs to be revaluated, maybe having a UI checkbox that switches between the two modes.

void VolumeRaycastRenderer::set_num_slices(int slices)
{
  shader.set_stepSize(0.01, 0.01, 0.01);
  // TODO:  Camilo Thinks this is not necessary for ray casting volume rendering.
  // we only need step size.
  // shader.set_stepSize(1.0f / slices, 1.0f / slices, 1.0f / slices);
}
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

No branches or pull requests

1 participant