Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-10-06 04:12:09 +0300
committerCampbell Barton <campbell@blender.org>2022-10-06 04:13:00 +0300
commit87d737cd792183d409760ab1f0a778abb9f1daa3 (patch)
tree14e4a18e75eb3adc20e1b5579ab4fa27cadeb839 /source/blender/gpu
parent51bd26d0faad306183c58bff0865b72cf99fbe90 (diff)
Cleanup: spelling in code comments
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/common/gpu_shader_common_math.glsl2
-rw-r--r--source/blender/gpu/shaders/common/gpu_shader_common_math_utils.glsl2
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_widget_base_frag.glsl2
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_widget_base_vert.glsl4
-rw-r--r--source/blender/gpu/shaders/gpu_shader_codegen_lib.glsl2
-rw-r--r--source/blender/gpu/shaders/gpu_shader_text_vert.glsl2
-rw-r--r--source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl2
-rw-r--r--source/blender/gpu/shaders/opengl/glsl_shader_defines.glsl2
8 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/gpu/shaders/common/gpu_shader_common_math.glsl b/source/blender/gpu/shaders/common/gpu_shader_common_math.glsl
index 5f640f64056..1e858bd4760 100644
--- a/source/blender/gpu/shaders/common/gpu_shader_common_math.glsl
+++ b/source/blender/gpu/shaders/common/gpu_shader_common_math.glsl
@@ -126,7 +126,7 @@ void math_pingpong(float a, float b, float c, out float result)
result = (b != 0.0) ? abs(fract((a - b) / (b * 2.0)) * b * 2.0 - b) : 0.0;
}
-/* Adapted from godotengine math_funcs.h. */
+/* Adapted from GODOT-engine math_funcs.h. */
void math_wrap(float a, float b, float c, out float result)
{
result = wrap(a, b, c);
diff --git a/source/blender/gpu/shaders/common/gpu_shader_common_math_utils.glsl b/source/blender/gpu/shaders/common/gpu_shader_common_math_utils.glsl
index 1ba22b4c5da..47f8e26db0b 100644
--- a/source/blender/gpu/shaders/common/gpu_shader_common_math_utils.glsl
+++ b/source/blender/gpu/shaders/common/gpu_shader_common_math_utils.glsl
@@ -132,7 +132,7 @@ vec3 fallback_pow(vec3 a, float b, vec3 fallback)
fallback_pow(a.z, b, fallback.z));
}
-/* Matirx Math */
+/* Matrix Math */
/* Return a 2D rotation matrix with the angle that the input 2D vector makes with the x axis. */
mat2 vector_to_rotation_matrix(vec2 vector)
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_widget_base_frag.glsl b/source/blender/gpu/shaders/gpu_shader_2D_widget_base_frag.glsl
index 662589fb2ce..cd8ff73b833 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_widget_base_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_widget_base_frag.glsl
@@ -6,7 +6,7 @@ vec3 compute_masks(vec2 uv)
bool right_half = uv.x > outRectSize.x * 0.5;
float corner_rad;
- /* Correct aspect ratio for 2D views not using uniform scalling.
+ /* Correct aspect ratio for 2D views not using uniform scaling.
* uv is already in pixel space so a uniform scale should give us a ratio of 1. */
float ratio = (butCo != -2.0) ? (dFdy(uv.y) / dFdx(uv.x)) : 1.0;
vec2 uv_sdf = uv;
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_widget_base_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_widget_base_vert.glsl
index c102b422211..d6c93df9849 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_widget_base_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_widget_base_vert.glsl
@@ -124,8 +124,8 @@ vec2 do_tria()
}
else if (triaType == 4.0) {
/* ROUNDBOX_TRIA_CHECK */
- /* A bit more hacky: We use the two trias joined together to render
- * both sides of the checkmark with different length. */
+ /* A bit more hacky: We use the two triangles joined together to render
+ * both sides of the check-mark with different length. */
pos = arrow_pos[min(vidx, 2)]; /* Only keep 1 triangle. */
pos.y = tria2 ? -pos.y : pos.y; /* Mirror along X */
pos = pos.x * vec2(0.0872, -0.996) + pos.y * vec2(0.996, 0.0872); /* Rotate (85deg) */
diff --git a/source/blender/gpu/shaders/gpu_shader_codegen_lib.glsl b/source/blender/gpu/shaders/gpu_shader_codegen_lib.glsl
index 94707de71ed..38734d5bbaf 100644
--- a/source/blender/gpu/shaders/gpu_shader_codegen_lib.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_codegen_lib.glsl
@@ -67,7 +67,7 @@ vec3 orco_get(vec3 local_pos, mat4 modelmatinv, vec4 orco_madd[2], vec4 orco)
/* If the object does not have any deformation, the orco layer calculation is done on the fly
* using the orco_madd factors.
* 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 == 0.0) {
return orco.xyz * 0.5 + 0.5;
}
diff --git a/source/blender/gpu/shaders/gpu_shader_text_vert.glsl b/source/blender/gpu/shaders/gpu_shader_text_vert.glsl
index 47527d907f4..87e464b6cce 100644
--- a/source/blender/gpu/shaders/gpu_shader_text_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_text_vert.glsl
@@ -6,7 +6,7 @@ void main()
glyph_dim = abs(glyph_size);
interp_size = int(glyph_size.x < 0) + int(glyph_size.y < 0);
- /* Quad expension using instanced rendering. */
+ /* Quad expansion using instanced rendering. */
float x = float(gl_VertexID % 2);
float y = float(gl_VertexID / 2);
vec2 quad = vec2(x, y);
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl
index 29ba4f3c119..0833809cc42 100644
--- a/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl
+++ b/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl
@@ -91,7 +91,7 @@ void node_bsdf_principled(vec4 base_color,
diffuse_data.sss_id = uint(do_sss);
/* NOTE(@fclem): We need to blend the reflection color but also need to avoid applying the
- * weights so we compule the ratio. */
+ * weights so we compute the ratio. */
float reflection_weight = specular_weight + glass_reflection_weight;
float reflection_weight_inv = safe_rcp(reflection_weight);
specular_weight *= reflection_weight_inv;
diff --git a/source/blender/gpu/shaders/opengl/glsl_shader_defines.glsl b/source/blender/gpu/shaders/opengl/glsl_shader_defines.glsl
index 0515a737e6e..706bae3e940 100644
--- a/source/blender/gpu/shaders/opengl/glsl_shader_defines.glsl
+++ b/source/blender/gpu/shaders/opengl/glsl_shader_defines.glsl
@@ -1,5 +1,5 @@
-/* Texture format tokens -- Type explictness required by other Graphics APIs. */
+/* Texture format tokens -- Type explicitness required by other Graphics APIs. */
#define depth2D sampler2D
#define depth2DArray sampler2DArray
#define depth2DMS sampler2DMS