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

Make sampling kernels #6

Closed
Teja10 opened this issue Jul 24, 2023 · 1 comment
Closed

Make sampling kernels #6

Teja10 opened this issue Jul 24, 2023 · 1 comment
Assignees

Comments

@Teja10
Copy link
Contributor

Teja10 commented Jul 24, 2023

After computing ray-intersections, we need to sample points from the entry and exit points.
See the below for details on the API: https://docs.google.com/document/d/1SCwFPvVdABQrFdUJ3PKErpjh5RIekKGXvfDJECeT8PY/edit#heading=h.1gy1ce1y3h7w

@crozhon
Copy link
Collaborator

crozhon commented Jul 27, 2023

Wrote sampling kernels.

They expect start and end points as float3 and also require a thrust::minstd_rng to be created elsewhere and provided to the kernel. The launch is performed with the number of segments as the number of threads. (A segment being the line from a start point to an end point).

Output is a list of sample points, with NUM_SAMPLES_PER_SEGMENT * NUM_SEGMENTS (aka the number of threads) as the size.

For the volume rendering kernel (See #7), it's a lot easier to use the t-value of the ray rather than the point itself. So that kernel still assumes that all of the samples that it receives are numbers from 0.0 to 1.0, where 0.0 is the point where the ray enters the volume for the first time, and t=1.0 is the point where it leaves the volume. So at some point, we'll need to either generate those instead or convert the samples to those.

@Teja10 Teja10 closed this as completed in 966caa9 Aug 13, 2023
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

2 participants