Skip to content

Commit a82630e

Browse files
committed
small corrections
1 parent 16e6c3e commit a82630e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/camera/perspective.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ end
9595
# Sample points on lens.
9696
p_lens = camera.core.lens_radius * concentric_sample_disk(sample.lens)
9797
# Compute point on plane of focus.
98-
t = camera.core.focal_distance / [3]
98+
t = camera.core.focal_distance / d[3]
9999
p_focus = o .+ d * t
100100
# Update ray for effects of lens.
101101
o = Point3f(p_lens[1], p_lens[2], 0f0)

src/integrators/sampler.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function li(
9393
wo = core.wo
9494
# Compute scattering functions for surface interaction.
9595
si, bsdf = compute_scattering!(primitive, si, ray)
96-
if bsdf.bxdfs.last == 0
96+
if isnan(bsdf.η) # TODO, better way to return "nothing" BSDFs
9797
return li(
9898
i, RayDifferentials(spawn_ray(si, ray.d)),
9999
scene, depth,

src/materials/bsdf.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct BSDF{S}
5353
bxdfs::BXDFVector{S}
5454
end
5555

56-
BSDF() = BSDF{RGBSpectrum}(0f0, Normal3f(0f0), Normal3f(0f0), Vec3f(0f0), Vec3f(0f0), BXDFVector{RGBSpectrum}())
56+
BSDF() = BSDF{RGBSpectrum}(NaN32, Normal3f(0f0), Normal3f(0f0), Vec3f(0f0), Vec3f(0f0), BXDFVector{RGBSpectrum}())
5757

5858

5959
function BSDF(si::SurfaceInteraction, sbdfs::Vararg{UberBxDF{S}, N}) where {S<:Spectrum, N}

0 commit comments

Comments
 (0)