MARMOTatZJU / GAMES101-HW

Homework repo. for GAMES-101: https://sites.cs.ucsb.edu/~lingqi/teaching/games101.html
61 stars 19 forks source link

BVH sample #5

Open QsingHuan opened 2 years ago

QsingHuan commented 2 years ago

in assignment 7, when sample on BVH https://github.com/MARMOTatZJU/GAMES101-HW/blob/b53fe6407b8e4ced48034e6b5a922408bbae6075/hw7/BVH.cpp#L167 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 commented 2 years ago

@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.