diff --git a/src/pbrt/cpu/aggregates.cpp b/src/pbrt/cpu/aggregates.cpp index eac4a2aa2f1862e75ca3dd254aab23dbcd8bf338..40012f9cd2c0834f0e778e9f761500608a897942 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 31b6c0c12b22fbdfcbf04107a1008c4579dad31f..4def36df6b143ed08c1e25723798e0440aaa4d6e 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 f376cbb1d77462e2f69aea7cbf66fc7924c7ac68..1da783312d75b09e303390ef560fe57390427b80 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 50931a19d6a8fe3f5d5425eef9d0e83199af7ce3..a44b7a2c561d0d91fbf85c85d492824090192ba0 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 b228f5dc454a1050a61d7434800e349fe70e3497..830701fb7cce62eeb76f772e35dd4114ca5e4f97 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 18fc2f41f7db0536743ef3a56bfe35a6eeece055..6ff21c2671821b981552c4735b5fca87d4718578 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 cf66523b34bb022d40e98b24db85a87d65294e21..68c13a8e17be6419419a157f6549382acc231844 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 b9f6ff0b50e0d29b6ee7417519521c53d0c46bfe..cfffa2267f18367b289383136aedb81edad5d4f1 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 e02036b38d6236ace9bc7a5ff5c11a9c835c211c..610bdb863f7d73480026adba3597f8913b98657f 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);