Skip to content

Commit

Permalink
Remove ray_dist from intersect_tri.
Browse files Browse the repository at this point in the history
  • Loading branch information
kugimasa committed Aug 21, 2023
1 parent 40da12b commit fbabdab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/shader/compute-sample.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ fn intersect_tri(r: Ray, id: u32, closest: HitInfo) -> HitInfo {
let norm = face_norm(r, tri.norm.xyz);
let ray_dist = distance(pos, start);
let flags = vec4f(tri.emissive, 0.0, 0.0, 0.0);
return HitInfo(ray_dist, pos, norm, closest.uv, tri.col, flags);
return HitInfo(closest.dist, pos, norm, closest.uv, tri.col, flags);
}

fn intersect_quad(r: Ray, id: u32, closest: HitInfo) -> HitInfo {
Expand Down

0 comments on commit fbabdab

Please sign in to comment.