提交 ddbf1f62 编写于 作者: M Matt Pharr

Update from book source. Just hyphenation and contraction pedantry.

上级 4550fb73
......@@ -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,
......
......@@ -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())
......
......@@ -47,7 +47,7 @@ std::pair<cudaEvent_t, cudaEvent_t> GetProfilerEvents(const char *description);
template <typename F>
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<std::type_index, int> kernelBlockSizes;
std::type_index index = std::type_index(typeid(F));
......
......@@ -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 ||
......
......@@ -151,8 +151,8 @@ 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.",
Warning(
"Sobol samplers with non power-of-two sample counts (%d) are suboptimal.",
samplesPerPixel);
}
......@@ -227,8 +227,8 @@ 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.",
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));
......@@ -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));
}
......
......@@ -607,7 +607,7 @@ bool Curve::RecursiveIntersect(const Ray &ray, Float tMax, pstd::span<const Poin
int depth, pstd::optional<ShapeIntersection> *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<Point3f, 7> cpSplit = SubdivideCubicBezier(cp);
Float u[3] = {u0, (u0 + u1) / 2, u1};
for (int seg = 0; seg < 2; ++seg) {
......
......@@ -141,7 +141,7 @@ Point2f InvertSphericalTriangleSample(const pstd::array<Point3f, 3> &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<const Float> nodes, pstd::span<const Float> 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<const Float> nodes1, pstd::span<const Float>
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
......
......@@ -81,7 +81,7 @@ PBRT_CPU_GPU inline pstd::array<Point3f, 4> ElevateQuadraticBezierToCubic(
PBRT_CPU_GPU inline pstd::array<Point3f, 3> QuadraticBSplineToBezier(
pstd::span<const Point3f> 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.
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册