Skip to content

Commit

Permalink
Handle unit distance more correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
szellmann committed Nov 27, 2024
1 parent f0efe26 commit a5f6841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DeviceCopyableObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ inline hit_record<Ray, primitive<unsigned>> intersect(Ray ray, const Volume &vol
if (majorant <= 0.f)
break;

t -= (logf(1.f - rnd()) / majorant) * unitDistance;
t -= (logf(1.f - rnd()) / (majorant * unitDistance));

if (t >= t1)
break;
Expand Down

0 comments on commit a5f6841

Please sign in to comment.