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

BVH sample #5

Open
QsingHuan opened this issue Feb 5, 2022 · 1 comment
Open

BVH sample #5

QsingHuan opened this issue Feb 5, 2022 · 1 comment

Comments

@QsingHuan
Copy link

in assignment 7, when sample on BVH

float p = std::sqrt(get_random_float()) * root->area;

the code use std::sqrt(get_random_float()) instead of uniform distribution to sample on the area, but i can't understand the reason for doing this. Is this a bug?

@MARMOTatZJU
Copy link
Owner

@QsingHuan There are some designs in get_random_float which are specific for parallelism. You may refer to get_random_float for these designs in detail.

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