[Bf-blender-cvs] [87d737cd792] master: Cleanup: spelling in code comments

Campbell Barton noreply at git.blender.org
Thu Oct 6 03:15:47 CEST 2022


Commit: 87d737cd792183d409760ab1f0a778abb9f1daa3
Author: Campbell Barton
Date:   Thu Oct 6 12:12:09 2022 +1100
Branches: master
https://developer.blender.org/rB87d737cd792183d409760ab1f0a778abb9f1daa3

Cleanup: spelling in code comments

===================================================================

M	source/blender/blenkernel/BKE_blender.h
M	source/blender/draw/engines/basic/shaders/basic_conservative_depth_geom.glsl
M	source/blender/draw/engines/eevee/shaders/effect_reflection_lib.glsl
M	source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
M	source/blender/draw/engines/eevee_next/shaders/eevee_attributes_lib.glsl
M	source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_accumulator_lib.glsl
M	source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_reduce_comp.glsl
M	source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl
M	source/blender/draw/engines/eevee_next/shaders/eevee_sampling_lib.glsl
M	source/blender/draw/engines/eevee_next/shaders/eevee_velocity_lib.glsl
M	source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl
M	source/blender/draw/engines/overlay/shaders/overlay_armature_shape_outline_vert.glsl
M	source/blender/draw/engines/overlay/shaders/overlay_armature_shape_outline_vert_no_geom.glsl
M	source/blender/draw/engines/overlay/shaders/overlay_background_frag.glsl
M	source/blender/draw/engines/overlay/shaders/overlay_edit_mesh_vert_no_geom.glsl
M	source/blender/draw/engines/overlay/shaders/overlay_edit_uv_edges_frag.glsl
M	source/blender/draw/engines/overlay/shaders/overlay_edit_uv_edges_geom.glsl
M	source/blender/draw/engines/overlay/shaders/overlay_motion_path_line_vert_no_geom.glsl
M	source/blender/draw/engines/overlay/shaders/overlay_paint_point_vert.glsl
M	source/blender/draw/engines/overlay/shaders/overlay_paint_wire_vert.glsl
M	source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
M	source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl
M	source/blender/draw/intern/shaders/common_debug_print_lib.glsl
M	source/blender/draw/intern/shaders/common_fxaa_lib.glsl
M	source/blender/draw/intern/shaders/common_view_lib.glsl
M	source/blender/gpu/shaders/common/gpu_shader_common_math.glsl
M	source/blender/gpu/shaders/common/gpu_shader_common_math_utils.glsl
M	source/blender/gpu/shaders/gpu_shader_2D_widget_base_frag.glsl
M	source/blender/gpu/shaders/gpu_shader_2D_widget_base_vert.glsl
M	source/blender/gpu/shaders/gpu_shader_codegen_lib.glsl
M	source/blender/gpu/shaders/gpu_shader_text_vert.glsl
M	source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl
M	source/blender/gpu/shaders/opengl/glsl_shader_defines.glsl

===================================================================

diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 1f0919bb3e6..acb67b30174 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -30,7 +30,7 @@ void BKE_blender_globals_main_replace(struct Main *bmain);
  * Replace current global Main by the given one, returning the old one.
  *
  * \warning Advanced, risky workaround addressing the issue that current RNA is not able to process
- * correectly non-G_MAIN data, use with (a lot of) care.
+ * correctly non-G_MAIN data, use with (a lot of) care.
  */
 struct Main *BKE_blender_globals_main_swap(struct Main *new_gmain);
 
diff --git a/source/blender/draw/engines/basic/shaders/basic_conservative_depth_geom.glsl b/source/blender/draw/engines/basic/shaders/basic_conservative_depth_geom.glsl
index d478f37691e..1a90a2f57c0 100644
--- a/source/blender/draw/engines/basic/shaders/basic_conservative_depth_geom.glsl
+++ b/source/blender/draw/engines/basic/shaders/basic_conservative_depth_geom.glsl
@@ -11,7 +11,7 @@
 
 void main()
 {
-  /* Compute plane normal in ndc space. */
+  /* Compute plane normal in NDC space. */
   vec3 pos0 = gl_in[0].gl_Position.xyz / gl_in[0].gl_Position.w;
   vec3 pos1 = gl_in[1].gl_Position.xyz / gl_in[1].gl_Position.w;
   vec3 pos2 = gl_in[2].gl_Position.xyz / gl_in[2].gl_Position.w;
@@ -33,7 +33,7 @@ void main()
       /* HACK: Fix cases where the triangle is too small make it cover at least one pixel. */
       gl_Position.xy += drw_view.viewport_size_inverse * gl_Position.w * ofs;
     }
-    /* Test if the triangle is almost parralele with the view to avoid precision issues. */
+    /* Test if the triangle is almost parallel with the view to avoid precision issues. */
     else if (any(is_subpixel) || is_coplanar) {
       /* HACK: Fix cases where the triangle is Parallel to the view by deforming it slightly. */
       vec2 ofs = (i == 0) ? vec2(-1.0) : ((i == 1) ? vec2(1.0, -1.0) : vec2(1.0));
diff --git a/source/blender/draw/engines/eevee/shaders/effect_reflection_lib.glsl b/source/blender/draw/engines/eevee/shaders/effect_reflection_lib.glsl
index ed600a3be86..a6781a0debe 100644
--- a/source/blender/draw/engines/eevee/shaders/effect_reflection_lib.glsl
+++ b/source/blender/draw/engines/eevee/shaders/effect_reflection_lib.glsl
@@ -47,7 +47,7 @@ HitData decode_hit_data(vec4 hit_data, float hit_depth)
   return data;
 }
 
-/* Blue noise categorised into 4 sets of samples.
+/* Blue noise categorized into 4 sets of samples.
  * See "Stochastic all the things" presentation slide 32-37. */
 const int resolve_samples_count = 9;
 const vec2 resolve_sample_offsets[36] = vec2[36](
diff --git a/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl b/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
index 6c1a95bba49..862d666ab5f 100644
--- a/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
+++ b/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl
@@ -206,7 +206,7 @@ vec3 probe_evaluate_planar(int id, PlanarData pd, vec3 P, vec3 N, vec3 V, float
   vec4 refco = ProjectionMatrix * (ViewMatrix * vec4(ref_pos, 1.0));
   refco.xy /= refco.w;
 
-  /* TODO: If we support non-ssr planar reflection, we should blur them with gaussian
+  /* TODO: If we support non-SSR planar reflection, we should blur them with gaussian
    * and chose the right mip depending on the cone footprint after projection */
   /* NOTE: X is inverted here to compensate inverted drawing. */
   vec3 radiance = textureLod(probePlanars, vec3(refco.xy * vec2(-0.5, 0.5) + 0.5, id), 0.0).rgb;
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_attributes_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_attributes_lib.glsl
index 6fe5fa01fa3..ea1b02e56b3 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_attributes_lib.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_attributes_lib.glsl
@@ -17,7 +17,7 @@
 vec3 attr_load_orco(vec4 orco)
 {
   /* We know when there is no orco layer when orco.w is 1.0 because it uses the generic vertex
-   * attrib (which is [0,0,0,1]). */
+   * attribute (which is [0,0,0,1]). */
   if (orco.w == 1.0) {
     /* If the object does not have any deformation, the orco layer calculation is done on the fly
      * using the orco_madd factors. */
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_accumulator_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_accumulator_lib.glsl
index 99a47c541e9..49a00b60abf 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_accumulator_lib.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_accumulator_lib.glsl
@@ -239,7 +239,7 @@ void dof_gather_accumulate_sample_ring(DofGatherData ring_data,
   }
 }
 
-/* FIXME(fclem) Seems to be wrong since it needs ringcount+1 as input for
+/* FIXME(fclem) Seems to be wrong since it needs `ringcount + 1` as input for
  * slightfocus gather. */
 /* This should be replaced by web_sample_count_get() but doing so is breaking other things. */
 int dof_gather_total_sample_count(const int ring_count, const int ring_density)
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_reduce_comp.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_reduce_comp.glsl
index a6426cd06e4..41a6fe466b9 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_reduce_comp.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_reduce_comp.glsl
@@ -82,7 +82,7 @@ void main()
 {
   ivec2 texel = min(ivec2(gl_GlobalInvocationID.xy), imageSize(inout_color_lod0_img) - 1);
   uvec2 texel_local = gl_LocalInvocationID.xy;
-  /* Increase readablility. */
+  /* Increase readability. */
 #define LOCAL_INDEX texel_local.y][texel_local.x
 #define LOCAL_OFFSET(x_, y_) texel_local.y + (y_)][texel_local.x + (x_)
 
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl
index 21b9a83abb9..8845434412e 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl
@@ -187,7 +187,7 @@ void film_cryptomatte_layer_accum_and_store(
   if (pass_id == -1) {
     return;
   }
-  /* x = hash, y = accumed weight. Only keep track of 4 highest weighted samples. */
+  /* x = hash, y = accumulated weight. Only keep track of 4 highest weighted samples. */
   vec2 crypto_samples[4] = vec2[4](vec2(0.0), vec2(0.0), vec2(0.0), vec2(0.0));
   for (int i = 0; i < film_buf.samples_len; i++) {
     FilmSample src = film_sample_get(i, texel_film);
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_sampling_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_sampling_lib.glsl
index 0eea4a5ff33..a54133167ac 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_sampling_lib.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_sampling_lib.glsl
@@ -41,7 +41,7 @@ vec3 sampling_rng_3D_get(const eSamplingDimension dimension)
 /** \name Random Number Generators.
  * \{ */
 
-/* Interlieved gradient noise by Jorge Jimenez
+/* Interleaved gradient noise by Jorge Jimenez
  * http://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare
  * Seeding found by Epic Game. */
 float interlieved_gradient_noise(vec2 pixel, float seed, float offset)
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_velocity_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_velocity_lib.glsl
index 8d02609fedc..a17aec8eae2 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_velocity_lib.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_velocity_lib.glsl
@@ -32,7 +32,7 @@ vec4 velocity_surface(vec3 P_prv, vec3 P, vec3 P_nxt)
     next_uv = curr_uv;
   }
   /* NOTE: We output both vectors in the same direction so we can reuse the same vector
-   * with rgrg swizzle in viewport. */
+   * with RGRG swizzle in viewport. */
   vec4 motion = vec4(prev_uv - curr_uv, curr_uv - next_uv);
   /* Convert NDC velocity to UV velocity */
   motion *= 0.5;
@@ -54,7 +54,7 @@ vec4 velocity_background(vec3 vV)
   vec2 curr_uv = project_point(camera_curr.winmat, V).xy;
   vec2 next_uv = project_point(camera_next.winmat, V).xy;
   /* NOTE: We output both vectors in the same direction so we can reuse the same vector
-   * with rgrg swizzle in viewport. */
+   * with RGRG swizzle in viewport. */
   vec4 motion = vec4(prev_uv - curr_uv, curr_uv - next_uv);
   /* Convert NDC velocity to UV velocity */
   motion *= 0.5;
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl
index 6671c16aa0b..7ddfdc5f65c 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl
@@ -101,33 +101,33 @@ void blend_mode_output(
 {
   switch (blend_mode) {
     case MODE_REGULAR:
-      /* Reminder: Blending func is premult alpha blend (dst.rgba * (1 - src.a) + src.rgb). */
+      /* Reminder: Blending func is premult alpha blend `(dst.rgba * (1 - src.a) + src.rgb)`. */
       color *= opacity;
       frag_color = color;
       frag_revealage = vec4(0.0, 0.0, 0.0, color.a);
       break;
     case MODE_MULTIPLY:
-      /* Reminder: Blending func is multiply blend (dst.rgba * src.rgba). */
+      /* Reminder: Blending func is multiply blend `(dst.rgba * src.rgba)`. */
       color.a *= opacity;
       frag_revealage = frag_color = (1.0 - color.a) + color.a * color;
       break;
     case MODE_DIVIDE:
-      /* Reminder: Blending func is multiply blend (dst.rgba * src.rgba). */
+      /* Reminder: Blending func is multiply blend `(dst.rgba * src.rgba)`. */
       color.a *= opacity;
       frag_revealage = frag_color = clamp(1.0 / max(vec4(1e-6), 1.0 - color * color.a), 0.0, 1e18);
       break;
     case MODE_HARDLIGHT: {
-      /* Reminder: Blending func is multiply blend (dst.rgba *

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list