Cleanup: fix typos
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D15680
This commit is contained in:
parent
e949d6da5b
commit
12e5b92c9c
|
@ -128,7 +128,7 @@ typedef struct NlaEvalData {
|
|||
int num_channels;
|
||||
NlaEvalSnapshot base_snapshot;
|
||||
|
||||
/* Evaluation result shapshot. */
|
||||
/* Evaluation result snapshot. */
|
||||
NlaEvalSnapshot eval_snapshot;
|
||||
} NlaEvalData;
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ void dof_slight_focus_gather(float radius, out vec4 out_color, out float out_wei
|
|||
dof_gather_accumulate_resolve(total_sample_count, bg_accum, bg_col, bg_weight, unused_occlusion);
|
||||
dof_gather_accumulate_resolve(total_sample_count, fg_accum, fg_col, fg_weight, unused_occlusion);
|
||||
|
||||
/* Fix weighting issues on perfectly focus > slight focus transitionning areas. */
|
||||
/* Fix weighting issues on perfectly focus > slight focus transitioning areas. */
|
||||
if (abs(center_data.coc) < 0.5) {
|
||||
bg_col = center_data.color;
|
||||
bg_weight = 1.0;
|
||||
|
|
|
@ -665,7 +665,7 @@ void dof_slight_focus_gather(sampler2D depth_tx,
|
|||
dof_gather_accumulate_resolve(total_sample_count, bg_accum, bg_col, bg_weight, unused_occlusion);
|
||||
dof_gather_accumulate_resolve(total_sample_count, fg_accum, fg_col, fg_weight, unused_occlusion);
|
||||
|
||||
/* Fix weighting issues on perfectly focus to slight focus transitionning areas. */
|
||||
/* Fix weighting issues on perfectly focus to slight focus transitioning areas. */
|
||||
if (abs(center_data.coc) < 0.5) {
|
||||
bg_col = center_data.color;
|
||||
bg_weight = 1.0;
|
||||
|
|
|
@ -134,7 +134,7 @@ void main()
|
|||
{
|
||||
/**
|
||||
* NOTE: We can **NOT** optimize by discarding some tiles as the result is sampled using bilinear
|
||||
* filtering in the resolve pass. Not outputing to a tile means that border texels have undefined
|
||||
* filtering in the resolve pass. Not outputting to a tile means that border texels have undefined
|
||||
* value and tile border will be noticeable in the final image.
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Gather pass: Convolve foreground and background parts in separate passes.
|
||||
*
|
||||
* Using the min&max CoC tile buffer, we select the best apropriate method to blur the scene color.
|
||||
* Using the min&max CoC tile buffer, we select the best appropriate method to blur the scene color.
|
||||
* A fast gather path is taken if there is not many CoC variation inside the tile.
|
||||
*
|
||||
* We sample using an octaweb sampling pattern. We randomize the kernel center and each ring
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Holefill pass: Gather background parts where foreground is present.
|
||||
*
|
||||
* Using the min&max CoC tile buffer, we select the best apropriate method to blur the scene color.
|
||||
* Using the min&max CoC tile buffer, we select the best appropriate method to blur the scene color.
|
||||
* A fast gather path is taken if there is not many CoC variation inside the tile.
|
||||
*
|
||||
* We sample using an octaweb sampling pattern. We randomize the kernel center and each ring
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* Inputs:
|
||||
* - Output of setup pass (halfres) and reduce downsample pass (quarter res).
|
||||
* Outputs:
|
||||
* - Halfres padded to avoid mipmap mis-alignment (so possibly not matching input size).
|
||||
* - Halfres padded to avoid mipmap misalignment (so possibly not matching input size).
|
||||
* - Gather input color (whole mip chain), Scatter rect list, Signed CoC (whole mip chain).
|
||||
**/
|
||||
|
||||
|
@ -98,7 +98,7 @@ void main()
|
|||
do_scatter[LOCAL_INDEX] *= dof_scatter_screen_border_rejection(coc_cache[LOCAL_INDEX], texel);
|
||||
/* Only scatter if neighborhood is different enough. */
|
||||
do_scatter[LOCAL_INDEX] *= dof_scatter_neighborhood_rejection(color_cache[LOCAL_INDEX].rgb);
|
||||
/* For debuging. */
|
||||
/* For debugging. */
|
||||
if (no_scatter_pass) {
|
||||
do_scatter[LOCAL_INDEX] = 0.0;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ float dof_slight_focus_coc_tile_get(vec2 frag_coord)
|
|||
}
|
||||
/* Use atomic reduce operation. */
|
||||
atomicMax(shared_max_slight_focus_abs_coc, floatBitsToUint(local_abs_max));
|
||||
/* "Broadcast" result accross all threads. */
|
||||
/* "Broadcast" result across all threads. */
|
||||
barrier();
|
||||
|
||||
return uintBitsToFloat(shared_max_slight_focus_abs_coc);
|
||||
|
@ -44,7 +44,7 @@ float dof_slight_focus_coc_tile_get(vec2 frag_coord)
|
|||
|
||||
vec3 dof_neighborhood_clamp(vec2 frag_coord, vec3 color, float center_coc, float weight)
|
||||
{
|
||||
/* Stabilize color by clamping with the stable half res neighboorhood. */
|
||||
/* Stabilize color by clamping with the stable half res neighborhood. */
|
||||
vec3 neighbor_min, neighbor_max;
|
||||
const vec2 corners[4] = vec2[4](vec2(-1, -1), vec2(1, -1), vec2(-1, 1), vec2(1, 1));
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
|
@ -211,7 +211,7 @@ vec2 dof_pixel_history_motion_vector(ivec2 texel_sample)
|
|||
return vector.xy * vec2(textureSize(color_tx, 0));
|
||||
}
|
||||
|
||||
/* Load color using a special filter to avoid loosing detail.
|
||||
/* Load color using a special filter to avoid losing detail.
|
||||
* \a texel is sample position with subpixel accuracy. */
|
||||
DofSample dof_sample_history(vec2 input_texel)
|
||||
{
|
||||
|
@ -285,17 +285,17 @@ float dof_history_blend_factor(
|
|||
|
||||
/* 5% of incoming color by default. */
|
||||
float blend = 0.05;
|
||||
/* Blend less history if the pixel has substential velocity. */
|
||||
/* Blend less history if the pixel has substantial velocity. */
|
||||
/* NOTE(fclem): velocity threshold multiplied by 2 because of half resolution. */
|
||||
blend = mix(blend, 0.20, saturate(velocity * 0.02 * 2.0));
|
||||
/**
|
||||
* "High Quality Temporal Supersampling" by Brian Karis at Siggraph 2014 (Slide 43)
|
||||
* Bias towards history if incomming pixel is near clamping. Reduces flicker.
|
||||
* Bias towards history if incoming pixel is near clamping. Reduces flicker.
|
||||
*/
|
||||
float distance_to_luma_clip = min_v2(vec2(luma_history - luma_min, luma_max - luma_history));
|
||||
/* Divide by bbox size to get a factor. 2 factor to compensate the line above. */
|
||||
distance_to_luma_clip *= 2.0 * safe_rcp(luma_max - luma_min);
|
||||
/* Linearly blend when history gets bellow to 25% of the bbox size. */
|
||||
/* Linearly blend when history gets below to 25% of the bbox size. */
|
||||
blend *= saturate(distance_to_luma_clip * 4.0 + 0.1);
|
||||
/* Progressively discard history until history CoC is twice as big as the filtered CoC.
|
||||
* Note we use absolute diff here because we are not comparing neighbors and thus do not risk to
|
||||
|
@ -335,7 +335,7 @@ void main()
|
|||
|
||||
DofSample dst = dof_sample_history(history_texel);
|
||||
|
||||
/* Get local color bounding box of source neighboorhood. */
|
||||
/* Get local color bounding box of source neighborhood. */
|
||||
DofNeighborhoodMinMax bbox = dof_neighbor_boundbox();
|
||||
|
||||
float blend = dof_history_blend_factor(velocity, history_texel, bbox, src, dst);
|
||||
|
|
|
@ -130,7 +130,7 @@ void main()
|
|||
gl_Position = p1;
|
||||
|
||||
/* compute position from 3 vertex because the change in direction
|
||||
* can happen very quicky and lead to very thin edges. */
|
||||
* can happen very quickly and lead to very thin edges. */
|
||||
vec2 ss0 = proj(p0);
|
||||
vec2 ss1 = proj(p1);
|
||||
vec2 ss2 = proj(p2);
|
||||
|
|
|
@ -11,7 +11,7 @@ bool drw_debug_draw_enable = true;
|
|||
const vec4 drw_debug_default_color = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Interals
|
||||
/** \name Internals
|
||||
* \{ */
|
||||
|
||||
uint drw_debug_start_draw(uint v_needed)
|
||||
|
|
|
@ -108,7 +108,7 @@ struct GPUSource {
|
|||
string_preprocess();
|
||||
}
|
||||
if ((source.find("drw_debug_") != StringRef::not_found) &&
|
||||
/* Avoid theses two files where it makes no sense to add the dependency. */
|
||||
/* Avoid these two files where it makes no sense to add the dependency. */
|
||||
(filename != "common_debug_draw_lib.glsl" &&
|
||||
filename != "draw_debug_draw_display_vert.glsl")) {
|
||||
builtins |= shader::BuiltinBits::USE_DEBUG_DRAW;
|
||||
|
|
|
@ -66,7 +66,7 @@ typedef struct wmMsg {
|
|||
} wmMsg;
|
||||
|
||||
typedef struct wmMsgSubscribeKey {
|
||||
/** Linked list for predicable ordering, otherwise we would depend on #GHash bucketing. */
|
||||
/** Linked list for predictable ordering, otherwise we would depend on #GHash bucketing. */
|
||||
struct wmMsgSubscribeKey *next, *prev;
|
||||
ListBase values;
|
||||
/* over-alloc, eg: wmMsgSubscribeKey_RNA */
|
||||
|
|
Loading…
Reference in New Issue