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 <ideasman42@gmail.com>2021-02-05 08:23:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-02-05 08:23:34 +0300
commit17e1e2bfd8dfbd6f6fc42cc305e93393342020f7 (patch)
tree8a164422f7eb7d3aa9f7473c19c80da535c29a05 /source/blender/draw/engines
parentb62b923f544fa1df0aecd56f3568dd5185601306 (diff)
Cleanup: correct spelling in comments
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r--source/blender/draw/engines/eevee/eevee_data.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_effects.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_engine.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.c16
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightprobes.c6
-rw-r--r--source/blender/draw/engines/eevee/eevee_lookdev.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_materials.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_occlusion.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h6
-rw-r--r--source/blender/draw/engines/eevee/eevee_render.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_sampling.c4
-rw-r--r--source/blender/draw/engines/eevee/eevee_screen_raytrace.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_shaders.c4
-rw-r--r--source/blender/draw/engines/eevee/eevee_shadows.c6
-rw-r--r--source/blender/draw/engines/eevee/eevee_shadows_cascade.c4
-rw-r--r--source/blender/draw/engines/eevee/eevee_shadows_cube.c2
-rw-r--r--source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl8
-rw-r--r--source/blender/draw/engines/external/external_engine.c2
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_cache_utils.c2
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c12
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.h8
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_render.c2
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_shader_fx.c2
-rw-r--r--source/blender/draw/engines/overlay/overlay_antialiasing.c2
-rw-r--r--source/blender/draw/engines/overlay/overlay_armature.c4
-rw-r--r--source/blender/draw/engines/overlay/overlay_edit_mesh.c2
-rw-r--r--source/blender/draw/engines/overlay/overlay_extra.c6
-rw-r--r--source/blender/draw/engines/overlay/overlay_metaball.c2
-rw-r--r--source/blender/draw/engines/overlay/overlay_particle.c2
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl2
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_antialiasing.c2
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_dof.c2
-rw-r--r--source/blender/draw/engines/workbench/workbench_materials.c2
-rw-r--r--source/blender/draw/engines/workbench/workbench_private.h4
-rw-r--r--source/blender/draw/engines/workbench/workbench_shadow.c2
35 files changed, 66 insertions, 66 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_data.c b/source/blender/draw/engines/eevee/eevee_data.c
index 47068d0b843..b453df284ed 100644
--- a/source/blender/draw/engines/eevee/eevee_data.c
+++ b/source/blender/draw/engines/eevee/eevee_data.c
@@ -130,7 +130,7 @@ EEVEE_ObjectMotionData *EEVEE_motion_blur_object_data_get(EEVEE_MotionBlurData *
}
EEVEE_ObjectKey key, *key_p;
- /* Small hack to avoid another comparisson. */
+ /* Small hack to avoid another comparison. */
key.ob = (Object *)((char *)ob + hair);
DupliObject *dup = DRW_object_get_dupli(ob);
if (dup) {
diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c
index ca583143572..698b959f1a9 100644
--- a/source/blender/draw/engines/eevee/eevee_effects.c
+++ b/source/blender/draw/engines/eevee/eevee_effects.c
@@ -242,7 +242,7 @@ void EEVEE_effects_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
}
{
- /* Perform min/max downsample */
+ /* Perform min/max down-sample. */
DRW_PASS_CREATE(psl->maxz_downlevel_ps, downsample_write | DRW_STATE_DEPTH_ALWAYS);
grp = DRW_shgroup_create(EEVEE_shaders_effect_maxz_downlevel_sh_get(), psl->maxz_downlevel_ps);
DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &txl->maxzbuffer);
diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c
index c6760de5cfa..802b47b61a4 100644
--- a/source/blender/draw/engines/eevee/eevee_engine.c
+++ b/source/blender/draw/engines/eevee/eevee_engine.c
@@ -319,7 +319,7 @@ static void eevee_draw_scene(void *vedata)
EEVEE_renderpasses_output_accumulate(sldata, vedata, false);
/* Transparent */
- /* TODO(fclem): should be its own Framebuffer.
+ /* TODO(fclem): should be its own Frame-buffer.
* This is needed because dualsource blending only works with 1 color buffer. */
GPU_framebuffer_texture_attach(fbl->main_color_fb, dtxl->depth, 0, 0);
GPU_framebuffer_bind(fbl->main_color_fb);
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c
index 040aa8c8d9c..c4973dc2e8b 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.c
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.c
@@ -99,9 +99,9 @@ typedef struct EEVEE_LightBake {
GPUTexture *rt_color;
/** Target cube depth texture. */
GPUTexture *rt_depth;
- /** Target cube framebuffers. */
+ /** Target cube frame-buffers. */
GPUFrameBuffer *rt_fb[6];
- /** Storage framebuffer. */
+ /** Storage frame-buffer. */
GPUFrameBuffer *store_fb;
/** Cube render target resolution. */
int rt_res;
@@ -135,7 +135,7 @@ typedef struct EEVEE_LightBake {
int grid_curr;
/** The current light bounce being evaluated. */
int bounce_curr, bounce_len;
- /** Resolution of the Visibility shadowmap. */
+ /** Resolution of the Visibility shadow-map. */
float vis_res;
/** Result of previous light bounce. */
GPUTexture *grid_prev;
@@ -163,7 +163,7 @@ typedef struct EEVEE_LightBake {
/** For only handling the resources. */
bool resource_only;
bool own_resources;
- /** If the lightcache was created for baking, it's first owned by the baker. */
+ /** If the light-cache was created for baking, it's first owned by the baker. */
bool own_light_cache;
/** ms. delay the start of the baking to not slowdown interactions (TODO remove) */
int delay;
@@ -907,7 +907,7 @@ static void eevee_lightbake_cache_create(EEVEE_Data *vedata, EEVEE_LightBake *lb
Scene *scene_eval = DEG_get_evaluated_scene(lbake->depsgraph);
lbake->sldata = sldata;
- /* Disable all effects BUT high bitdepth shadows. */
+ /* Disable all effects BUT high bit-depth shadows. */
scene_eval->eevee.flag &= SCE_EEVEE_SHADOW_HIGH_BITDEPTH;
scene_eval->eevee.taa_samples = 1;
scene_eval->eevee.gi_irradiance_smoothing = 0.0f;
@@ -980,7 +980,7 @@ static void eevee_lightbake_copy_irradiance(EEVEE_LightBake *lbake, LightCache *
{
DRW_TEXTURE_FREE_SAFE(lbake->grid_prev);
- /* Copy texture by reading back and reuploading it. */
+ /* Copy texture by reading back and re-uploading it. */
float *tex = GPU_texture_read(lcache->grid_tx.tex, GPU_DATA_FLOAT, 0);
lbake->grid_prev = DRW_texture_create_2d_array(lbake->irr_size[0],
lbake->irr_size[1],
@@ -1330,7 +1330,7 @@ void EEVEE_lightbake_update(void *custom_data)
EEVEE_LightBake *lbake = (EEVEE_LightBake *)custom_data;
Scene *scene_orig = lbake->scene;
- /* If a new lightcache was created, free the old one and reference the new. */
+ /* If a new light-cache was created, free the old one and reference the new. */
if (lbake->lcache && scene_orig->eevee.light_cache_data != lbake->lcache) {
if (scene_orig->eevee.light_cache_data != NULL) {
EEVEE_lightcache_free(scene_orig->eevee.light_cache_data);
@@ -1353,7 +1353,7 @@ static bool lightbake_do_sample(EEVEE_LightBake *lbake,
Depsgraph *depsgraph = lbake->depsgraph;
- /* TODO: make DRW manager instanciable (and only lock on drawing) */
+ /* TODO: make DRW manager instantiable (and only lock on drawing) */
eevee_lightbake_context_enable(lbake);
DRW_custom_pipeline(&draw_engine_eevee_type, depsgraph, render_callback, lbake);
lbake->done += 1;
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index 3671bea9ac0..395d4dc790d 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -704,11 +704,11 @@ static void lightbake_planar_ensure_view(EEVEE_PlanarReflection *eplanar,
static void eevee_lightprobes_extract_from_cache(EEVEE_LightProbesInfo *pinfo, LightCache *lcache)
{
/* copy the entire cache for now (up to MAX_PROBE) */
- /* TODO Frutum cull to only add visible probes. */
+ /* TODO: frustum cull to only add visible probes. */
memcpy(pinfo->probe_data,
lcache->cube_data,
sizeof(EEVEE_LightProbe) * max_ii(1, min_ii(lcache->cube_len, MAX_PROBE)));
- /* TODO compute the max number of grid based on sample count. */
+ /* TODO: compute the max number of grid based on sample count. */
memcpy(pinfo->grid_data,
lcache->grid_data,
sizeof(EEVEE_LightGrid) * max_ii(1, min_ii(lcache->grid_len, MAX_GRID)));
@@ -1041,7 +1041,7 @@ void EEVEE_lightbake_filter_glossy(EEVEE_ViewLayerData *sldata,
pinfo->layer = probe_idx * 6;
pinfo->roughness = i / (float)maxlevel;
pinfo->roughness *= pinfo->roughness; /* Disney Roughness */
- pinfo->roughness *= pinfo->roughness; /* Distribute Roughness accros lod more evenly */
+ pinfo->roughness *= pinfo->roughness; /* Distribute Roughness across lod more evenly. */
CLAMP(pinfo->roughness, 1e-8f, 0.99999f); /* Avoid artifacts */
#if 1 /* Variable Sample count and bias (fast) */
diff --git a/source/blender/draw/engines/eevee/eevee_lookdev.c b/source/blender/draw/engines/eevee/eevee_lookdev.c
index 628941f68a2..a9998b33b7e 100644
--- a/source/blender/draw/engines/eevee/eevee_lookdev.c
+++ b/source/blender/draw/engines/eevee/eevee_lookdev.c
@@ -344,7 +344,7 @@ void EEVEE_lookdev_draw(EEVEE_Data *vedata)
DRW_view_set_active(effects->lookdev_view);
- /* Find the right framebuffers to render to. */
+ /* Find the right frame-buffers to render to. */
GPUFrameBuffer *fb = (effects->target_buffer == fbl->effect_color_fb) ? fbl->main_fb :
fbl->effect_fb;
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c
index 273521b0b28..56e4af0b6de 100644
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@ -234,7 +234,7 @@ void EEVEE_materials_init(EEVEE_ViewLayerData *sldata,
}
{
- /* Update noise Framebuffer. */
+ /* Update noise Frame-buffer. */
GPU_framebuffer_ensure_config(
&fbl->update_noise_fb,
{GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE_LAYER(e_data.util_tex, 2)});
diff --git a/source/blender/draw/engines/eevee/eevee_occlusion.c b/source/blender/draw/engines/eevee/eevee_occlusion.c
index fd96a076c68..a3b581357e0 100644
--- a/source/blender/draw/engines/eevee/eevee_occlusion.c
+++ b/source/blender/draw/engines/eevee/eevee_occlusion.c
@@ -273,7 +273,7 @@ void EEVEE_occlusion_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *
if (fbl->ao_accum_fb != NULL) {
DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
- /* Update the min_max/horizon buffers so the refracion materials appear in it. */
+ /* Update the min_max/horizon buffers so the refraction materials appear in it. */
EEVEE_create_minmax_buffer(vedata, dtxl->depth, -1);
EEVEE_occlusion_compute(sldata, vedata, dtxl->depth, -1);
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index 9702db5fecc..9845ec903e5 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -518,7 +518,7 @@ typedef struct EEVEE_LightsInfo {
struct EEVEE_Shadow shadow_data[MAX_SHADOW];
struct EEVEE_ShadowCube shadow_cube_data[MAX_SHADOW_CUBE];
struct EEVEE_ShadowCascade shadow_cascade_data[MAX_SHADOW_CASCADE];
- /* Additionnal rendering info for cascade. */
+ /* Additional rendering info for cascade. */
struct EEVEE_ShadowCascadeRender shadow_cascade_render[MAX_SHADOW_CASCADE];
/* Back index in light_data. */
uchar shadow_cube_light_indices[MAX_SHADOW_CUBE];
@@ -766,7 +766,7 @@ typedef struct EEVEE_EffectsInfo {
struct GPUTexture *source_buffer; /* latest updated texture */
struct GPUFrameBuffer *target_buffer; /* next target to render to */
struct GPUTexture *final_tx; /* Final color to transform to display color space. */
- struct GPUFrameBuffer *final_fb; /* Framebuffer with final_tx as attachment. */
+ struct GPUFrameBuffer *final_fb; /* Frame-buffer with final_tx as attachment. */
} EEVEE_EffectsInfo;
/* ***************** COMMON DATA **************** */
@@ -1431,7 +1431,7 @@ static const float texcomat[4][4] = {
{0.5f, 0.5f, 0.5f, 1.0f},
};
-/* Cubemap Matrices */
+/* Cube-map Matrices */
static const float cubefacemat[6][4][4] = {
/* Pos X */
{{0.0f, 0.0f, -1.0f, 0.0f},
diff --git a/source/blender/draw/engines/eevee/eevee_render.c b/source/blender/draw/engines/eevee/eevee_render.c
index bb974688404..72b12f6daeb 100644
--- a/source/blender/draw/engines/eevee/eevee_render.c
+++ b/source/blender/draw/engines/eevee/eevee_render.c
@@ -556,7 +556,7 @@ void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl
DRW_render_instance_buffer_finish();
/* Need to be called after DRW_render_instance_buffer_finish() */
- /* Also we weed to have a correct fbo bound for DRW_hair_update */
+ /* Also we weed to have a correct FBO bound for DRW_hair_update */
GPU_framebuffer_bind(fbl->main_fb);
DRW_hair_update();
diff --git a/source/blender/draw/engines/eevee/eevee_sampling.c b/source/blender/draw/engines/eevee/eevee_sampling.c
index 253dae79902..aa11f072fa5 100644
--- a/source/blender/draw/engines/eevee/eevee_sampling.c
+++ b/source/blender/draw/engines/eevee/eevee_sampling.c
@@ -69,11 +69,11 @@ void EEVEE_sample_rectangle(int sample_ofs,
BLI_halton_2d(ht_primes, ht_offset, sample_ofs, ht_point);
- /* Decorelate AA and shadow samples. (see T68594) */
+ /* De-correlate AA and shadow samples. (see T68594) */
ht_point[0] = fmod(ht_point[0] * 1151.0, 1.0);
ht_point[1] = fmod(ht_point[1] * 1069.0, 1.0);
- /* Change ditribution center to be 0,0 */
+ /* Change distribution center to be 0,0 */
ht_point[0] = (ht_point[0] > 0.5f) ? ht_point[0] - 1.0f : ht_point[0];
ht_point[1] = (ht_point[1] > 0.5f) ? ht_point[1] - 1.0f : ht_point[1];
diff --git a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c
index ed7d53b51af..1465c9dd84c 100644
--- a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c
+++ b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c
@@ -106,7 +106,7 @@ int EEVEE_screen_raytrace_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
GPU_framebuffer_texture_attach(fbl->main_fb, effects->ssr_specrough_input, 2, 0);
- /* Raytracing output */
+ /* Ray-tracing output. */
effects->ssr_hit_output = DRW_texture_pool_query_2d(
tracing_res[0], tracing_res[1], GPU_RG16I, &draw_engine_eevee_type);
effects->ssr_pdf_output = DRW_texture_pool_query_2d(
diff --git a/source/blender/draw/engines/eevee/eevee_shaders.c b/source/blender/draw/engines/eevee/eevee_shaders.c
index 7a277c18f01..7a83bebdeca 100644
--- a/source/blender/draw/engines/eevee/eevee_shaders.c
+++ b/source/blender/draw/engines/eevee/eevee_shaders.c
@@ -85,7 +85,7 @@ static struct {
struct GPUShader *lookdev_background;
struct GPUShader *update_noise_sh;
- /* Downsample Depth */
+ /* Down-sample Depth */
struct GPUShader *minz_downlevel_sh;
struct GPUShader *maxz_downlevel_sh;
struct GPUShader *minz_downdepth_sh;
@@ -96,7 +96,7 @@ static struct {
struct GPUShader *minz_copydepth_sh;
struct GPUShader *maxz_copydepth_sh;
- /* Simple Downsample */
+ /* Simple Down-sample */
struct GPUShader *downsample_sh;
struct GPUShader *downsample_cube_sh;
diff --git a/source/blender/draw/engines/eevee/eevee_shadows.c b/source/blender/draw/engines/eevee/eevee_shadows.c
index fa5afd60235..e29830defff 100644
--- a/source/blender/draw/engines/eevee/eevee_shadows.c
+++ b/source/blender/draw/engines/eevee/eevee_shadows.c
@@ -141,7 +141,7 @@ void EEVEE_shadows_caster_register(EEVEE_ViewLayerData *sldata, Object *ob)
}
if (ob->base_flag & BASE_FROM_DUPLI) {
- /* Duplis will always refresh the shadowmaps as if they were deleted each frame. */
+ /* Duplis will always refresh the shadow-maps as if they were deleted each frame. */
/* TODO(fclem): fix this. */
update = true;
}
@@ -259,7 +259,7 @@ void EEVEE_shadows_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
BoundSphere *bsphere = linfo->shadow_bounds;
/* Search for deleted shadow casters or if shcaster WAS in shadow radius. */
for (int i = 0; i < backbuffer->count; i++) {
- /* If the shadowcaster has been deleted or updated. */
+ /* If the shadow-caster has been deleted or updated. */
if (BLI_BITMAP_TEST(backbuffer->update, i)) {
for (int j = 0; j < linfo->cube_len; j++) {
if (!BLI_BITMAP_TEST(&linfo->sh_cube_update[0], j)) {
@@ -273,7 +273,7 @@ void EEVEE_shadows_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
/* Search for updates in current shadow casters. */
bbox = frontbuffer->bbox;
for (int i = 0; i < frontbuffer->count; i++) {
- /* If the shadowcaster has been updated. */
+ /* If the shadow-caster has been updated. */
if (BLI_BITMAP_TEST(frontbuffer->update, i)) {
for (int j = 0; j < linfo->cube_len; j++) {
if (!BLI_BITMAP_TEST(&linfo->sh_cube_update[0], j)) {
diff --git a/source/blender/draw/engines/eevee/eevee_shadows_cascade.c b/source/blender/draw/engines/eevee/eevee_shadows_cascade.c
index 246bc18b71a..6cb4b39fafa 100644
--- a/source/blender/draw/engines/eevee/eevee_shadows_cascade.c
+++ b/source/blender/draw/engines/eevee/eevee_shadows_cascade.c
@@ -330,7 +330,7 @@ static void eevee_shadow_cascade_setup(EEVEE_LightsInfo *linfo,
DRW_debug_sphere(center, csm_render->radius[c], dbg_col);
#endif
- /* Project into lightspace */
+ /* Project into light-space. */
mul_m4_v3(viewmat, center);
/* Snap projection center to nearest texel to cancel shimmering. */
@@ -376,7 +376,7 @@ static void eevee_shadow_cascade_setup(EEVEE_LightsInfo *linfo,
#endif
}
- /* Bias is in clipspace, divide by range. */
+ /* Bias is in clip-space, divide by range. */
shdw_data->bias = csm_render->original_bias * 0.05f / fabsf(sh_far - sh_near);
shdw_data->near = sh_near;
shdw_data->far = sh_far;
diff --git a/source/blender/draw/engines/eevee/eevee_shadows_cube.c b/source/blender/draw/engines/eevee/eevee_shadows_cube.c
index 19b86476c29..89caa0dd193 100644
--- a/source/blender/draw/engines/eevee/eevee_shadows_cube.c
+++ b/source/blender/draw/engines/eevee/eevee_shadows_cube.c
@@ -142,7 +142,7 @@ static void eevee_ensure_cube_views(
float winmat[4][4];
float side = near;
- /* TODO shadowcube array. */
+ /* TODO: shadow-cube array. */
if (true) {
/* This half texel offset is used to ensure correct filtering between faces. */
/* FIXME: This exhibit float precision issue with lower cube_res.
diff --git a/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl
index 312d9f63ce0..9199eae816d 100644
--- a/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl
@@ -211,16 +211,16 @@ void main()
float w = 1.0 / (50.0 * float(KERNEL) * 4.0);
accum_bg += center_color * w;
w_accum.x += w;
- /* Note: In Jimenez's presentation, they used center sample.
- * We use background color as it contains more informations for foreground
+ /* NOTE: In Jimenez's presentation, they used center sample.
+ * We use background color as it contains more information for foreground
* elements that have not enough weights.
- * Yield beter blur in complex motion. */
+ * Yield better blur in complex motion. */
center_color = accum_bg / w_accum.x;
#endif
/* Merge background. */
accum += accum_bg;
w_accum.y += w_accum.x;
- /* Balance accumulation for failled samples.
+ /* Balance accumulation for failed samples.
* We replace the missing foreground by the background. */
float blend_fac = saturate(1.0 - w_accum.y / w_accum.z);
fragColor = (accum / w_accum.z) + center_color * blend_fac;
diff --git a/source/blender/draw/engines/external/external_engine.c b/source/blender/draw/engines/external/external_engine.c
index 1b331052a06..adb21540afb 100644
--- a/source/blender/draw/engines/external/external_engine.c
+++ b/source/blender/draw/engines/external/external_engine.c
@@ -108,7 +108,7 @@ static void external_engine_init(void *vedata)
const DRWContextState *draw_ctx = DRW_context_state_get();
ARegion *region = draw_ctx->region;
- /* Depth prepass */
+ /* Depth pre-pass. */
if (!e_data.depth_sh) {
const GPUShaderConfigData *sh_cfg = &GPU_shader_cfg_data[GPU_SHADER_CFG_DEFAULT];
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
index f2472699300..33b91efc848 100644
--- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
@@ -365,7 +365,7 @@ GPENCIL_tLayer *gpencil_layer_cache_add(GPENCIL_PrivateData *pd,
DRW_shgroup_call_procedural_triangles(grp, NULL, 1);
if (gpl->blend_mode == eGplBlendMode_HardLight) {
- /* We cannot do custom blending on MultiTarget framebuffers.
+ /* We cannot do custom blending on Multi-Target frame-buffers.
* Workaround by doing 2 passes. */
grp = DRW_shgroup_create(sh, tgp_layer->blend_ps);
DRW_shgroup_state_disable(grp, DRW_STATE_BLEND_MUL);
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 6627d38366f..e738b0d063c 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -281,7 +281,7 @@ void GPENCIL_cache_init(void *ved)
});
}
else {
- /* Free uneeded buffers. */
+ /* Free unneeded buffers. */
GPU_FRAMEBUFFER_FREE_SAFE(fbl->snapshot_fb);
DRW_TEXTURE_FREE_SAFE(txl->snapshot_depth_tx);
DRW_TEXTURE_FREE_SAFE(txl->snapshot_color_tx);
@@ -333,7 +333,7 @@ void GPENCIL_cache_init(void *ved)
pd->dof_params[0] = -focus_dist * pd->dof_params[1];
}
else {
- /* Disable DoF blur scalling. */
+ /* Disable DoF blur scaling. */
pd->camera = NULL;
}
}
@@ -346,7 +346,7 @@ typedef struct gpIterPopulateData {
GPENCIL_PrivateData *pd;
GPENCIL_MaterialPool *matpool;
DRWShadingGroup *grp;
- /* Last material UBO bound. Used to avoid uneeded buffer binding. */
+ /* Last material UBO bound. Used to avoid unneeded buffer binding. */
GPUUniformBuf *ubo_mat;
GPUUniformBuf *ubo_lights;
/* Last texture bound. */
@@ -385,7 +385,7 @@ static void gpencil_drawcall_flush(gpIterPopulateData *iter)
iter->vcount = 0;
}
-/* Group drawcalls that are consecutive and with the same type. Reduces GPU driver overhead. */
+/* Group draw-calls that are consecutive and with the same type. Reduces GPU driver overhead. */
static void gpencil_drawcall_add(
gpIterPopulateData *iter, struct GPUBatch *geom, bool instancing, int v_first, int v_count)
{
@@ -399,7 +399,7 @@ static void gpencil_drawcall_add(
#endif
int last = iter->vfirst + iter->vcount;
- /* Interupt drawcall grouping if the sequence is not consecutive. */
+ /* Interrupt draw-call grouping if the sequence is not consecutive. */
if ((geom != iter->geom) || (v_first - last > 3)) {
gpencil_drawcall_flush(iter);
}
@@ -686,7 +686,7 @@ void GPENCIL_cache_finish(void *ved)
/* Sort object by decreasing Z to avoid most of alpha ordering issues. */
gpencil_object_cache_sort(pd);
- /* Create framebuffers only if needed. */
+ /* Create frame-buffers only if needed. */
if (pd->tobjects.first) {
eGPUTextureFormat format = pd->use_signed_fb ? GPU_RGBA16F : GPU_R11F_G11F_B10F;
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h
index 2b07ea53187..5ceb909bc88 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -110,7 +110,7 @@ BLI_STATIC_ASSERT_ALIGN(gpLight, 16)
typedef struct GPENCIL_MaterialPool {
/* Linklist. */
struct GPENCIL_MaterialPool *next;
- /* GPU representatin of materials. */
+ /* GPU representation of materials. */
gpMaterial mat_data[GP_MATERIAL_BUFFER_LEN];
/* Matching ubo. */
struct GPUUniformBuf *ubo;
@@ -122,7 +122,7 @@ typedef struct GPENCIL_MaterialPool {
} GPENCIL_MaterialPool;
typedef struct GPENCIL_LightPool {
- /* GPU representatin of materials. */
+ /* GPU representation of materials. */
gpLight light_data[GPENCIL_LIGHT_BUFFER_LEN];
/* Matching ubo. */
struct GPUUniformBuf *ubo;
@@ -151,7 +151,7 @@ typedef struct GPENCIL_tVfx {
/** Linklist */
struct GPENCIL_tVfx *next;
DRWPass *vfx_ps;
- /* Framebuffer reference since it may not be allocated yet. */
+ /* Frame-buffer reference since it may not be allocated yet. */
GPUFrameBuffer **target_fb;
} GPENCIL_tVfx;
@@ -352,7 +352,7 @@ typedef struct GPENCIL_PrivateData {
bool use_lighting;
/* Use physical lights or just ambient lighting. */
bool use_lights;
- /* Do we need additional framebuffers? */
+ /* Do we need additional frame-buffers? */
bool use_layer_fb;
bool use_object_fb;
bool use_mask_fb;
diff --git a/source/blender/draw/engines/gpencil/gpencil_render.c b/source/blender/draw/engines/gpencil/gpencil_render.c
index 9ac9a4dc078..b597a786e86 100644
--- a/source/blender/draw/engines/gpencil/gpencil_render.c
+++ b/source/blender/draw/engines/gpencil/gpencil_render.c
@@ -47,7 +47,7 @@ void GPENCIL_render_init(GPENCIL_Data *vedata,
const float *viewport_size = DRW_viewport_size_get();
const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
- /* Set the pers & view matrix. */
+ /* Set the perspective & view matrix. */
float winmat[4][4], viewmat[4][4], viewinv[4][4];
struct Object *camera = DEG_get_evaluated_object(depsgraph, RE_GetCamera(engine->re));
diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
index f4af5ebff99..0b66141e51a 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -397,7 +397,7 @@ static void gpencil_vfx_shadow(ShadowShaderFxData *fx, Object *ob, gpIterVfxData
unit_m4(uv_mat);
zero_v2(wave_ofs);
- /* We reseted the uv_mat so we need to accound for the rotation in the */
+ /* We reset the uv_mat so we need to account for the rotation in the */
copy_v2_fl2(tmp, 0.0f, blur_size[1]);
rotate_v2_v2fl(blur_dir, tmp, -fx->rotation);
mul_v2_v2(blur_dir, vp_size_inv);
diff --git a/source/blender/draw/engines/overlay/overlay_antialiasing.c b/source/blender/draw/engines/overlay/overlay_antialiasing.c
index 229f9c5a88f..c602e536f79 100644
--- a/source/blender/draw/engines/overlay/overlay_antialiasing.c
+++ b/source/blender/draw/engines/overlay/overlay_antialiasing.c
@@ -93,7 +93,7 @@ void OVERLAY_antialiasing_init(OVERLAY_Data *vedata)
line_tex = txl->overlay_line_tx;
}
else {
- /* Just a copy of the defaults framebuffers. */
+ /* Just a copy of the defaults frame-buffers. */
color_tex = dtxl->color_overlay;
}
diff --git a/source/blender/draw/engines/overlay/overlay_armature.c b/source/blender/draw/engines/overlay/overlay_armature.c
index cbd2589f20f..7042d095b56 100644
--- a/source/blender/draw/engines/overlay/overlay_armature.c
+++ b/source/blender/draw/engines/overlay/overlay_armature.c
@@ -1691,13 +1691,13 @@ static void draw_bone_degrees_of_freedom(ArmatureDrawContext *ctx, bPoseChannel
unit_m4(posetrans);
translate_m4(posetrans, pchan->pose_mat[3][0], pchan->pose_mat[3][1], pchan->pose_mat[3][2]);
- /* in parent-bone pose space... */
+ /* In parent-bone pose space... */
if (pchan->parent) {
copy_m4_m4(tmp, pchan->parent->pose_mat);
zero_v3(tmp[3]);
mul_m4_m4m4(posetrans, posetrans, tmp);
}
- /* ... but own restspace */
+ /* ... but own rest-space. */
mul_m4_m4m3(posetrans, posetrans, pchan->bone->bone_mat);
float scale = pchan->bone->length * pchan->size[1];
diff --git a/source/blender/draw/engines/overlay/overlay_edit_mesh.c b/source/blender/draw/engines/overlay/overlay_edit_mesh.c
index 38e171cb5e2..40a9dbe01c0 100644
--- a/source/blender/draw/engines/overlay/overlay_edit_mesh.c
+++ b/source/blender/draw/engines/overlay/overlay_edit_mesh.c
@@ -344,7 +344,7 @@ void OVERLAY_edit_mesh_draw(OVERLAY_Data *vedata)
if (pd->edit_mesh.do_zbufclip) {
DRW_draw_pass(psl->edit_mesh_depth_ps[IN_FRONT]);
- /* render facefill */
+ /* Render face-fill. */
DRW_view_set_active(pd->view_edit_faces);
DRW_draw_pass(psl->edit_mesh_faces_ps[NOT_IN_FRONT]);
diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c
index 39f17581e0d..91e605bf0ae 100644
--- a/source/blender/draw/engines/overlay/overlay_extra.c
+++ b/source/blender/draw/engines/overlay/overlay_extra.c
@@ -642,10 +642,10 @@ void OVERLAY_light_cache_populate(OVERLAY_Data *vedata, Object *ob)
} instdata;
copy_m4_m4(instdata.mat, ob->obmat);
- /* FIXME / TODO: clipend has no meaning nowadays.
- * In EEVEE, Only clipsta is used shadowmaping.
+ /* FIXME / TODO: clip_end has no meaning nowadays.
+ * In EEVEE, Only clip_sta is used shadow-mapping.
* Clip end is computed automatically based on light power.
- * For now, always use the custom distance as clipend. */
+ * For now, always use the custom distance as clip_end. */
instdata.clip_end = la->att_dist;
instdata.clip_sta = la->clipsta;
diff --git a/source/blender/draw/engines/overlay/overlay_metaball.c b/source/blender/draw/engines/overlay/overlay_metaball.c
index f973c1eda8a..46076a7c88b 100644
--- a/source/blender/draw/engines/overlay/overlay_metaball.c
+++ b/source/blender/draw/engines/overlay/overlay_metaball.c
@@ -63,7 +63,7 @@ static void metaball_instance_data_set(
mul_v3_v3fl(data->mat[1], ob->obmat[1], radius / 0.05f);
mul_v3_v3fl(data->mat[2], ob->obmat[2], radius / 0.05f);
mul_v3_m4v3(data->mat[3], ob->obmat, pos);
- /* WATCH: Reminder, alpha is wiresize. */
+ /* WATCH: Reminder, alpha is wire-size. */
OVERLAY_bone_instance_data_set_color(data, color);
}
diff --git a/source/blender/draw/engines/overlay/overlay_particle.c b/source/blender/draw/engines/overlay/overlay_particle.c
index fa95bad4d86..71064e7ff47 100644
--- a/source/blender/draw/engines/overlay/overlay_particle.c
+++ b/source/blender/draw/engines/overlay/overlay_particle.c
@@ -185,7 +185,7 @@ void OVERLAY_particle_cache_populate(OVERLAY_Data *vedata, Object *ob)
/* TODO(fclem): Here would be a good place for preemptive culling. */
- /* fclem: Is color even usefull in our modern context? */
+ /* NOTE(fclem): Is color even useful in our modern context? */
Material *ma = BKE_object_material_get(ob, part->omat);
float color[4] = {0.6f, 0.6f, 0.6f, part->draw_size};
if (ma != NULL) {
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl
index eaa553a10de..9bd49bb84f8 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl
@@ -288,7 +288,7 @@ void main()
ls_ray_dir -= ls_ray_ori;
- /* TODO: Align rays to volume center so that it mimics old behaviour of slicing the volume. */
+ /* TODO: Align rays to volume center so that it mimics old behavior of slicing the volume. */
float dist = line_unit_box_intersect_dist(ls_ray_ori, ls_ray_dir);
if (dist > 0.0) {
diff --git a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
index 20c30d9ce68..feb48b2623d 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
@@ -75,7 +75,7 @@ static void workbench_taa_jitter_init_order(float (*table)[2], int num)
swap_v2_v2(table[0], table[closest_index]);
}
- /* sort list based on furtest distance with previous */
+ /* Sort list based on farthest distance with previous. */
for (int i = 0; i < num - 2; i++) {
float f_squared_dist = 0.0;
int f_index = i;
diff --git a/source/blender/draw/engines/workbench/workbench_effect_dof.c b/source/blender/draw/engines/workbench/workbench_effect_dof.c
index 73cd501190f..a00453fe125 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_dof.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_dof.c
@@ -104,7 +104,7 @@ static void workbench_dof_setup_samples(struct GPUUniformBuf **ubo,
square_to_circle(x, y, &r, &T);
samp[2] = r;
- /* Bokeh shape parametrisation */
+ /* Bokeh shape parameterization. */
if (bokeh_sides > 1.0f) {
float denom = T - (2.0 * M_PI / bokeh_sides) *
floorf((bokeh_sides * T + M_PI) / (2.0 * M_PI));
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c
index 6aa794bda51..6e9118bfe46 100644
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@ -76,7 +76,7 @@ void workbench_material_ubo_data(WORKBENCH_PrivateData *wpd,
alpha *= mat->a;
copy_v3_v3(data->base_color, &mat->r);
metallic = mat->metallic;
- roughness = sqrtf(mat->roughness); /* Remap to disney roughness. */
+ roughness = sqrtf(mat->roughness); /* Remap to Disney roughness. */
}
else {
copy_v3_fl(data->base_color, 0.8f);
diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h
index d157c260fbd..522aae7f542 100644
--- a/source/blender/draw/engines/workbench/workbench_private.h
+++ b/source/blender/draw/engines/workbench/workbench_private.h
@@ -225,7 +225,7 @@ BLI_STATIC_ASSERT_ALIGN(WORKBENCH_UBO_Material, 16)
typedef struct WORKBENCH_Prepass {
/** Hash storing shading group for each Material or GPUTexture to reduce state changes. */
struct GHash *material_hash;
- /** First common (non-vcol and non-image colored) shading group to created subgroups. */
+ /** First common (non-vertex-color and non-image-colored) shading group to created subgroups. */
struct DRWShadingGroup *common_shgrp;
/** First Vertex Color shading group to created subgroups. */
struct DRWShadingGroup *vcol_shgrp;
@@ -384,7 +384,7 @@ typedef struct WORKBENCH_ViewLayerData {
struct GPUUniformBuf *cavity_sample_ubo;
/** Blue noise texture used to randomize the sampling of some effects.*/
struct GPUTexture *cavity_jitter_tx;
- /** Materials ubos allocated in a memblock for easy bookeeping. */
+ /** Materials UBO's allocated in a memblock for easy bookkeeping. */
struct BLI_memblock *material_ubo;
struct BLI_memblock *material_ubo_data;
/** Number of samples for which cavity_sample_ubo is valid. */
diff --git a/source/blender/draw/engines/workbench/workbench_shadow.c b/source/blender/draw/engines/workbench/workbench_shadow.c
index 881c186e3e5..99d945c311e 100644
--- a/source/blender/draw/engines/workbench/workbench_shadow.c
+++ b/source/blender/draw/engines/workbench/workbench_shadow.c
@@ -157,7 +157,7 @@ void workbench_shadow_cache_init(WORKBENCH_Data *data)
DRWState state = DRW_STATE_DEPTH_LESS | DRW_STATE_STENCIL_ALWAYS;
#endif
- /* TODO(fclem): Merge into one pass with subpasses. */
+ /* TODO(fclem): Merge into one pass with sub-passes. */
DRW_PASS_CREATE(psl->shadow_ps[0], state | depth_pass_state);
DRW_PASS_CREATE(psl->shadow_ps[1], state | depth_fail_state);