From ddbf1f6287df2251b9bdaaebbed3b5fc3f7b8587 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Thu, 1 Jul 2021 07:26:08 -0700 Subject: [PATCH] Update from book source. Just hyphenation and contraction pedantry. --- src/pbrt/cpu/aggregates.cpp | 2 +- src/pbrt/cpu/integrators.cpp | 6 +++--- src/pbrt/gpu/util.h | 2 +- src/pbrt/lightsamplers.h | 2 +- src/pbrt/samplers.h | 16 ++++++++-------- src/pbrt/shapes.cpp | 2 +- src/pbrt/util/sampling.cpp | 6 +++--- src/pbrt/util/splines.h | 2 +- src/pbrt/wavefront/integrator.cpp | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/pbrt/cpu/aggregates.cpp b/src/pbrt/cpu/aggregates.cpp index eac4a2a..40012f9 100644 --- a/src/pbrt/cpu/aggregates.cpp +++ b/src/pbrt/cpu/aggregates.cpp @@ -479,7 +479,7 @@ BVHBuildNode *BVHAggregate::emitLBVH(BVHBuildNode *&buildNodes, } else { int mask = 1 << bitIndex; - // Advance to next subtree level if there's no LBVH split for this bit + // Advance to next subtree level if there is no LBVH split for this bit if ((mortonPrims[0].mortonCode & mask) == (mortonPrims[nPrimitives - 1].mortonCode & mask)) return emitLBVH(buildNodes, bvhPrimitives, mortonPrims, nPrimitives, diff --git a/src/pbrt/cpu/integrators.cpp b/src/pbrt/cpu/integrators.cpp index 31b6c0c..4def36d 100644 --- a/src/pbrt/cpu/integrators.cpp +++ b/src/pbrt/cpu/integrators.cpp @@ -541,7 +541,7 @@ void LightPathIntegrator::EvaluatePixelSample(Point2i pPixel, int sampleIndex, camera.SampleWi(*les->intr, sampler.Get2D(), lambda); if (cs && cs->pdf != 0) { if (Float pdf = light.PDF_Li(cs->pLens, cs->wi); pdf > 0) { - // Add light's emitted radiance if non-zero and light is visible + // Add light's emitted radiance if nonzero and light is visible SampledSpectrum Le = light.L(les->intr->p(), les->intr->n, les->intr->uv, cs->wi, lambda); if (Le && Unoccluded(cs->pRef, cs->pLens)) { @@ -1810,7 +1810,7 @@ struct Vertex { pdf = pdfDir * invDist2; } else { - // Compute sampling density for non-infinite light sources + // Compute sampling density for noninfinite light sources CHECK(type == VertexType::Light); CHECK(ei.light); Float pdfPos, pdfDir; @@ -1834,7 +1834,7 @@ struct Vertex { return InfiniteLightDensity(infiniteLights, lightSampler, w); } else { - // Return sampling density for non-infinite light source + // Return sampling density for noninfinite light source Light light = (type == VertexType::Light) ? ei.light : si.areaLight; Float pdfPos, pdfDir, pdfChoice = lightSampler.PDF(light); if (IsOnSurface()) diff --git a/src/pbrt/gpu/util.h b/src/pbrt/gpu/util.h index f376cbb..1da7833 100644 --- a/src/pbrt/gpu/util.h +++ b/src/pbrt/gpu/util.h @@ -47,7 +47,7 @@ std::pair GetProfilerEvents(const char *description); template inline int GetBlockSize(const char *description, F kernel) { - // Note: this isn't re-entrant, but that's fine for our purposes... + // Note: this isn't reentrant, but that's fine for our purposes... static std::map kernelBlockSizes; std::type_index index = std::type_index(typeid(F)); diff --git a/src/pbrt/lightsamplers.h b/src/pbrt/lightsamplers.h index 50931a1..a44b7a2 100644 --- a/src/pbrt/lightsamplers.h +++ b/src/pbrt/lightsamplers.h @@ -312,7 +312,7 @@ class BVHLightSampler { nodeIndex = (child == 0) ? (nodeIndex + 1) : node.childOrLightIndex; } else { - // Confirm light has non-zero importance before returning light sample + // Confirm light has nonzero importance before returning light sample if (nodeIndex > 0) DCHECK_GT(node.lightBounds.Importance(p, n, allLightBounds), 0); if (nodeIndex > 0 || diff --git a/src/pbrt/samplers.h b/src/pbrt/samplers.h index b228f5d..830701f 100644 --- a/src/pbrt/samplers.h +++ b/src/pbrt/samplers.h @@ -151,9 +151,9 @@ class PaddedSobolSampler { PaddedSobolSampler(int samplesPerPixel, RandomizeStrategy randomizer, int seed = 0) : samplesPerPixel(samplesPerPixel), randomize(randomizer), seed(seed) { if (!IsPowerOf2(samplesPerPixel)) - Warning("Sobol samplers with non power-of-two sample counts (%d) are " - "sub-optimal.", - samplesPerPixel); + Warning( + "Sobol samplers with non power-of-two sample counts (%d) are suboptimal.", + samplesPerPixel); } PBRT_CPU_GPU @@ -227,9 +227,9 @@ class ZSobolSampler { RandomizeStrategy randomize, int seed = 0) : randomize(randomize), seed(seed) { if (!IsPowerOf2(samplesPerPixel)) - Warning("Sobol samplers with non power-of-two sample counts (%d) are " - "sub-optimal.", - samplesPerPixel); + Warning( + "Sobol samplers with non power-of-two sample counts (%d) are suboptimal.", + samplesPerPixel); log2SamplesPerPixel = Log2Int(samplesPerPixel); int res = RoundUpPow2(std::max(fullResolution.x, fullResolution.y)); int log4SamplesPerPixel = (log2SamplesPerPixel + 1) / 2; @@ -484,8 +484,8 @@ class SobolSampler { RandomizeStrategy randomize) : samplesPerPixel(samplesPerPixel), randomize(randomize) { if (!IsPowerOf2(samplesPerPixel)) - Warning("Non power-of-two sample count %d will perform sub-optimally with " - "the SobolSampler.", + Warning("Non power-of-two sample count %d will perform suboptimally with the " + "SobolSampler.", samplesPerPixel); scale = RoundUpPow2(std::max(fullResolution.x, fullResolution.y)); } diff --git a/src/pbrt/shapes.cpp b/src/pbrt/shapes.cpp index 18fc2f4..6ff21c2 100644 --- a/src/pbrt/shapes.cpp +++ b/src/pbrt/shapes.cpp @@ -607,7 +607,7 @@ bool Curve::RecursiveIntersect(const Ray &ray, Float tMax, pstd::span *si) const { Float rayLength = Length(ray.d); if (depth > 0) { - // Split curve segment into sub-segments and test for intersection + // Split curve segment into subsegments and test for intersection pstd::array cpSplit = SubdivideCubicBezier(cp); Float u[3] = {u0, (u0 + u1) / 2, u1}; for (int seg = 0; seg < 2; ++seg) { diff --git a/src/pbrt/util/sampling.cpp b/src/pbrt/util/sampling.cpp index cf66523..68c13a8 100644 --- a/src/pbrt/util/sampling.cpp +++ b/src/pbrt/util/sampling.cpp @@ -141,7 +141,7 @@ Point2f InvertSphericalTriangleSample(const pstd::array &v, Point3f if (Dot(a, cp) > 0.99999847691f /* 0.1 degrees */) u0 = 0; else { - // Compute area $A'$ of sub-triangle + // Compute area $A'$ of subtriangle Vector3f n_cpb = Cross(cp, b), n_acp = Cross(a, cp); CHECK_RARE(1e-5, LengthSquared(n_cpb) == 0 || LengthSquared(n_acp) == 0); if (LengthSquared(n_cpb) == 0 || LengthSquared(n_acp) == 0) @@ -391,7 +391,7 @@ Float SampleCatmullRom(pstd::span nodes, pstd::span f, Float d1 = (i + 2 < nodes.size()) ? width * (f[i + 2] - f0) / (nodes[i + 2] - x0) : (f1 - f0); - // Re-scale _u_ for continuous spline sampling step + // Rescale _u_ for continuous spline sampling step u = (u - F[i]) / width; // Invert definite integral over spline segment @@ -443,7 +443,7 @@ Float SampleCatmullRom2D(pstd::span nodes1, pstd::span Float width = x1 - x0; Float d0, d1; - // Re-scale _u_ using the interpolated _cdf_ + // Rescale _u_ using the interpolated _cdf_ u = (u - interpolate(cdf, idx)) / width; // Approximate derivatives using finite differences of the interpolant diff --git a/src/pbrt/util/splines.h b/src/pbrt/util/splines.h index b9f6ff0..cfffa22 100644 --- a/src/pbrt/util/splines.h +++ b/src/pbrt/util/splines.h @@ -81,7 +81,7 @@ PBRT_CPU_GPU inline pstd::array ElevateQuadraticBezierToCubic( PBRT_CPU_GPU inline pstd::array QuadraticBSplineToBezier( pstd::span cp) { // We can compute equivalent Bezier control points via some blossoming. - // We have three control points and a uniform knot vector; we'll label + // We have three control points and a uniform knot vector; we will label // the points p01, p12, and p23. We want the Bezier control points of // the equivalent curve, which are p11, p12, and p22. We already have // p12. diff --git a/src/pbrt/wavefront/integrator.cpp b/src/pbrt/wavefront/integrator.cpp index e02036b..610bdb8 100644 --- a/src/pbrt/wavefront/integrator.cpp +++ b/src/pbrt/wavefront/integrator.cpp @@ -652,7 +652,7 @@ void WavefrontPathIntegrator::HandleEscapedRays() { } } - // Update pixel radiance if ray's radiance is non-zero + // Update pixel radiance if ray's radiance is nonzero if (L) { PBRT_DBG("Added L %f %f %f %f for escaped ray pixel index %d\n", L[0], L[1], L[2], L[3], w.pixelIndex); -- GitLab