mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-10 14:51:40 +00:00
Fix non-rtx version of TraceFirstHitTriangleT
This fixes sunlight
This commit is contained in:
parent
4b05dccb8a
commit
0a53030010
1 changed files with 2 additions and 2 deletions
|
@ -473,8 +473,8 @@ int TraceFirstHitTriangleT(vec3 origin, float tmin, vec3 dir, float tmax, out fl
|
|||
float segmentlen = max(200.0, tracedist / 20.0);
|
||||
for (float t = 0.0; t < tracedist; t += segmentlen)
|
||||
{
|
||||
float segstart = t / tracedist;
|
||||
float segend = min(t + segmentlen, tracedist) / tracedist;
|
||||
float segstart = t;
|
||||
float segend = min(t + segmentlen, tracedist);
|
||||
|
||||
RayBBox ray = create_ray(ray_start + ray_dir * segstart, ray_start + ray_dir * segend);
|
||||
TraceHit hit = find_first_hit(ray);
|
||||
|
|
Loading…
Reference in a new issue