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:
Diffstat (limited to 'source/blender/draw/engines/eevee')
-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
17 files changed, 36 insertions, 36 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;