Faster random implementation
This commit is contained in:
parent
321c677da2
commit
742ef283e4
7 changed files with 49 additions and 10 deletions
|
|
@ -34,8 +34,8 @@ bool hittable_list<T>::hit(const ray& r, float t_min, float t_max, hit_record& r
|
|||
bool hit_anything = false;
|
||||
float closest_so_far = t_max;
|
||||
|
||||
|
||||
for (uint32_t i = 0; i < objects.size(); ++i)
|
||||
uint32_t s = objects.size();
|
||||
for (uint32_t i = 0; i < s; ++i)
|
||||
{
|
||||
T *object = &objects[i];
|
||||
if (object->hit(r, t_min, closest_so_far, temp_rec))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue