Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2022-04-04 12:29:30 +10:00
parent 27fea7a3a5
commit 85a0115c44
4 changed files with 18 additions and 18 deletions

View File

@ -276,7 +276,7 @@ ccl_device_forceinline void mnee_setup_manifold_vertex(KernelGlobals kg,
object_normal_transform_auto(kg, sd_vtx, &normals[2]);
}
/* Tangent space (position derivatives) wrt barycentric (u, v). */
/* Tangent space (position derivatives) WRT barycentric (u, v). */
vtx->dp_du = verts[0] - verts[2];
vtx->dp_dv = verts[1] - verts[2];
@ -297,7 +297,7 @@ ccl_device_forceinline void mnee_setup_manifold_vertex(KernelGlobals kg,
normals[2] * (1.0f - sd_vtx->u - sd_vtx->v),
&n_len);
/* Shading normal derivatives wrt barycentric (u, v)
/* Shading normal derivatives WRT barycentric (u, v)
* we calculate the derivative of n = |u*n0 + v*n1 + (1-u-v)*n2| using:
* d/du [f(u)/|f(u)|] = [d/du f(u)]/|f(u)| - f(u)/|f(u)|^3 <f(u), d/du f(u)>. */
const float inv_n_len = 1.f / n_len;
@ -340,13 +340,13 @@ ccl_device_forceinline void mnee_setup_manifold_vertex(KernelGlobals kg,
if (det != 0.f) {
const float inv_det = 1.f / det;
/* Tangent space (position derivatives) wrt texture (u, v). */
/* Tangent space (position derivatives) WRT texture (u, v). */
const float3 dp_du = vtx->dp_du;
const float3 dp_dv = vtx->dp_dv;
vtx->dp_du = (duv1.y * dp_du - duv0.y * dp_dv) * inv_det;
vtx->dp_dv = (-duv1.x * dp_du + duv0.x * dp_dv) * inv_det;
/* Shading normal derivatives wrt texture (u, v). */
/* Shading normal derivatives WRT texture (u, v). */
const float3 dn_du = vtx->dn_du;
const float3 dn_dv = vtx->dn_dv;
vtx->dn_du = (duv1.y * dn_du - duv0.y * dn_dv) * inv_det;
@ -434,7 +434,7 @@ ccl_device_forceinline bool mnee_compute_constraint_derivatives(
float3 dH_du, dH_dv;
/* Constraint derivatives wrt previous vertex. */
/* Constraint derivatives WRT previous vertex. */
if (vi > 0) {
ccl_private ManifoldVertex &v_prev = vertices[vi - 1];
dH_du = (v_prev.dp_du - wi * dot(wi, v_prev.dp_du)) * ili;
@ -447,7 +447,7 @@ ccl_device_forceinline bool mnee_compute_constraint_derivatives(
v.a = make_float4(dot(dH_du, s), dot(dH_dv, s), dot(dH_du, t), dot(dH_dv, t));
}
/* Constraint derivatives wrt current vertex. */
/* Constraint derivatives WRT current vertex. */
if (vi == vertex_count - 1 && light_fixed_direction) {
dH_du = ili * (-v.dp_du + wi * dot(wi, v.dp_du));
dH_dv = ili * (-v.dp_dv + wi * dot(wi, v.dp_dv));
@ -475,7 +475,7 @@ ccl_device_forceinline bool mnee_compute_constraint_derivatives(
dot(dH_du, t) + dot(H, dt_du),
dot(dH_dv, t) + dot(H, dt_dv));
/* Constraint derivatives wrt next vertex. */
/* Constraint derivatives WRT next vertex. */
if (vi < vertex_count - 1) {
ccl_private ManifoldVertex &v_next = vertices[vi + 1];
dH_du = (v_next.dp_du - wo * dot(wo, v_next.dp_du)) * ilo;
@ -488,7 +488,7 @@ ccl_device_forceinline bool mnee_compute_constraint_derivatives(
v.c = make_float4(dot(dH_du, s), dot(dH_dv, s), dot(dH_du, t), dot(dH_dv, t));
}
/* Constraint vector wrt. the local shading frame. */
/* Constraint vector WRT. the local shading frame. */
v.constraint = make_float2(dot(s, H), dot(t, H)) - v.n_offset;
}
return true;
@ -561,7 +561,7 @@ ccl_device_forceinline bool mnee_newton_solver(KernelGlobals kg,
bool resolve_constraint = true;
for (int iteration = 0; iteration < MNEE_MAX_ITERATIONS; iteration++) {
if (resolve_constraint) {
/* Calculate constraintand its derivatives for vertices. */
/* Calculate constraint and its derivatives for vertices. */
if (!mnee_compute_constraint_derivatives(
vertex_count, vertices, sd->P, light_fixed_direction, light_sample))
return false;
@ -797,7 +797,7 @@ ccl_device_forceinline bool mnee_compute_transfer_matrix(ccl_private const Shade
det_dh_dx *= Lk_det;
}
/* Fill out constraint derivatives wrt light vertex param. */
/* Fill out constraint derivatives WRT light vertex param. */
/* Local shading frame at last free vertex. */
int mi = vertex_count - 1;
@ -845,7 +845,7 @@ ccl_device_forceinline bool mnee_compute_transfer_matrix(ccl_private const Shade
dH_dtheta -= H * dot(dH_dtheta, H);
dH_dphi -= H * dot(dH_dphi, H);
/* constraint derivatives wrt light direction expressed
/* Constraint derivatives WRT light direction expressed
* in spherical coordinates (theta, phi). */
dc_dlight = make_float4(
dot(dH_dtheta, s), dot(dH_dphi, s), dot(dH_dtheta, t), dot(dH_dphi, t));
@ -909,7 +909,7 @@ ccl_device_forceinline bool mnee_path_contribution(KernelGlobals kg,
* and keep pdf in vertex area measure */
mnee_update_light_sample(kg, vertices[vertex_count - 1].p, ls);
/* Evaluate light sam.ple
/* Evaluate light sample
* in case the light has a node-based shader:
* 1. sd_mnee will be used to store light data, which is why we need to do
* this evaluation here. sd_mnee needs to contain the solution's last
@ -952,7 +952,7 @@ ccl_device_forceinline bool mnee_path_contribution(KernelGlobals kg,
for (int vi = 0; vi < vertex_count; vi++) {
ccl_private const ManifoldVertex &v = vertices[vi];
/* Check visiblity. */
/* Check visibility. */
probe_ray.D = normalize_len(v.p - probe_ray.P, &probe_ray.t);
if (scene_intersect(kg, &probe_ray, PATH_RAY_TRANSMIT, &probe_isect)) {
int hit_object = (probe_isect.object == OBJECT_NONE) ?

View File

@ -100,7 +100,7 @@ typedef struct CurvePenData {
bool multi_point;
/* Whether a point has already been selected. */
bool selection_made;
/* Whether a shift-click occured. */
/* Whether a shift-click occurred. */
bool select_multi;
/* Whether the current handle type of the moved handle is free. */

View File

@ -394,9 +394,9 @@ typedef enum eSpaceOutliner_Mode {
/** #SpaceOutliner.outlinevis */
typedef enum eSpaceOutliner_LibOverrideViewMode {
/* View all overrides with RNA buttons to edit the overridden values. */
/** View all overrides with RNA buttons to edit the overridden values. */
SO_LIB_OVERRIDE_VIEW_PROPERTIES = 0,
/* View entire override hierarchies (relationships between overriden data-blocks). */
/** View entire override hierarchies (relationships between overridden data-blocks). */
SO_LIB_OVERRIDE_VIEW_HIERARCHIES = 1,
} eSpaceOutliner_LibOverrideViewMode;
@ -517,7 +517,7 @@ typedef enum eGraphEdit_Mode {
typedef enum eGraphEdit_Runtime_Flag {
/** Temporary flag to force channel selections to be synced with main. */
SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC = (1 << 0),
/** Temporary flag to force fcurves to recalculate colors. */
/** Temporary flag to force F-curves to recalculate colors. */
SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR = (1 << 1),
/**

View File

@ -264,7 +264,7 @@ bool rna_Cache_use_disk_cache_override_apply(Main *UNUSED(bmain),
/* DO NOT call `RNA_property_update_main(bmain, NULL, ptr_dst, prop_dst);`, that would trigger
* the whole 'update from mem point cache' process, ending up in the complete deletion of an
* existing diskcache if any. */
* existing disk-cache if any. */
return true;
}