From 4b9ff3cd42be427e478743648e9951bf8c189a04 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 24 Jun 2021 15:56:58 +1000 Subject: Cleanup: comment blocks, trailing space in comments --- .../draw/engines/eevee/eevee_depth_of_field.c | 20 ++++++++++---------- source/blender/draw/engines/eevee/eevee_lightcache.c | 2 +- source/blender/draw/engines/eevee/eevee_materials.c | 4 ++-- .../blender/draw/engines/eevee/eevee_motion_blur.c | 6 +++--- source/blender/draw/engines/eevee/eevee_private.h | 2 +- source/blender/draw/engines/eevee/eevee_shaders.c | 4 ++-- source/blender/draw/engines/eevee/eevee_shadows.c | 2 +- .../engines/eevee/shaders/ambient_occlusion_lib.glsl | 4 ++-- .../engines/eevee/shaders/bsdf_sampling_lib.glsl | 2 +- .../draw/engines/eevee/shaders/btdf_lut_frag.glsl | 4 ++-- .../draw/engines/eevee/shaders/closure_eval_lib.glsl | 4 ++-- .../engines/eevee/shaders/common_utiltex_lib.glsl | 2 +- .../engines/eevee/shaders/effect_dof_bokeh_frag.glsl | 2 +- .../eevee/shaders/effect_dof_dilate_tiles_frag.glsl | 2 +- .../eevee/shaders/effect_dof_downsample_frag.glsl | 2 +- .../eevee/shaders/effect_dof_filter_frag.glsl | 2 +- .../eevee/shaders/effect_dof_flatten_tiles_frag.glsl | 2 +- .../eevee/shaders/effect_dof_gather_frag.glsl | 2 +- .../draw/engines/eevee/shaders/effect_dof_lib.glsl | 4 ++-- .../eevee/shaders/effect_dof_reduce_frag.glsl | 6 +++--- .../eevee/shaders/effect_dof_resolve_frag.glsl | 4 ++-- .../eevee/shaders/effect_dof_scatter_frag.glsl | 2 +- .../engines/eevee/shaders/effect_dof_setup_frag.glsl | 2 +- .../draw/engines/eevee/shaders/lightprobe_lib.glsl | 2 +- .../draw/engines/eevee/shaders/random_lib.glsl | 2 +- .../draw/engines/eevee/shaders/raytrace_lib.glsl | 2 +- .../draw/engines/eevee/shaders/surface_lib.glsl | 2 +- .../draw/engines/eevee/shaders/volumetric_lib.glsl | 2 +- .../draw/engines/gpencil/gpencil_cache_utils.c | 2 +- source/blender/draw/engines/gpencil/gpencil_engine.c | 2 +- .../gpencil/shaders/gpencil_antialiasing_frag.glsl | 2 +- .../engines/gpencil/shaders/gpencil_common_lib.glsl | 2 +- .../engines/image/shaders/engine_image_frag.glsl | 2 +- .../blender/draw/engines/overlay/overlay_armature.c | 2 +- .../blender/draw/engines/overlay/overlay_edit_uv.c | 2 +- source/blender/draw/engines/overlay/overlay_extra.c | 4 ++-- .../draw/engines/overlay/overlay_motion_path.c | 2 +- .../blender/draw/engines/overlay/overlay_outline.c | 2 +- .../blender/draw/engines/overlay/overlay_private.h | 2 +- .../draw/engines/overlay/shaders/extra_vert.glsl | 8 ++++---- .../workbench/shaders/workbench_common_lib.glsl | 2 +- .../workbench/shaders/workbench_data_lib.glsl | 2 +- .../workbench/shaders/workbench_image_lib.glsl | 2 +- .../draw/engines/workbench/workbench_effect_dof.c | 6 +++--- .../draw/engines/workbench/workbench_volume.c | 4 ++-- 45 files changed, 72 insertions(+), 72 deletions(-) (limited to 'source/blender/draw/engines') diff --git a/source/blender/draw/engines/eevee/eevee_depth_of_field.c b/source/blender/draw/engines/eevee/eevee_depth_of_field.c index 7986d7a2810..77e7291b78d 100644 --- a/source/blender/draw/engines/eevee/eevee_depth_of_field.c +++ b/source/blender/draw/engines/eevee/eevee_depth_of_field.c @@ -234,7 +234,7 @@ int EEVEE_depth_of_field_init(EEVEE_ViewLayerData *UNUSED(sldata), } const float scale_camera = (is_ortho) ? 1.0 : 0.001f; - /* we want radius here for the aperture number */ + /* We want radius here for the aperture number. */ float aperture = 0.5f * scale_camera * focal_len / fstop; float focal_len_scaled = scale_camera * focal_len; float sensor_scaled = scale_camera * sensor; @@ -352,7 +352,7 @@ int EEVEE_depth_of_field_init(EEVEE_ViewLayerData *UNUSED(sldata), /** * Create bokeh texture. - **/ + */ static void dof_bokeh_pass_init(EEVEE_FramebufferList *fbl, EEVEE_PassList *psl, EEVEE_EffectsInfo *fx) @@ -392,7 +392,7 @@ static void dof_bokeh_pass_init(EEVEE_FramebufferList *fbl, /** * Outputs halfResColorBuffer and halfResCocBuffer. - **/ + */ static void dof_setup_pass_init(EEVEE_FramebufferList *fbl, EEVEE_PassList *psl, EEVEE_EffectsInfo *fx) @@ -426,7 +426,7 @@ static void dof_setup_pass_init(EEVEE_FramebufferList *fbl, /** * Outputs min & max COC in each 8x8 half res pixel tiles (so 1/16th of full resolution). - **/ + */ static void dof_flatten_tiles_pass_init(EEVEE_FramebufferList *fbl, EEVEE_PassList *psl, EEVEE_EffectsInfo *fx) @@ -459,7 +459,7 @@ static void dof_flatten_tiles_pass_init(EEVEE_FramebufferList *fbl, * Dilates the min & max COCS to cover maximum COC values. * Output format/dimensions should be the same as coc_flatten_pass as they are swapped for * doing multiple dilation passes. - **/ + */ static void dof_dilate_tiles_pass_init(EEVEE_FramebufferList *fbl, EEVEE_PassList *psl, EEVEE_EffectsInfo *fx) @@ -540,7 +540,7 @@ static void dof_dilate_tiles_pass_draw(EEVEE_FramebufferList *fbl, /** * Create mipmapped color & COC textures for gather passes. - **/ + */ static void dof_reduce_pass_init(EEVEE_FramebufferList *fbl, EEVEE_PassList *psl, EEVEE_TextureList *txl, @@ -666,7 +666,7 @@ static void dof_reduce_pass_init(EEVEE_FramebufferList *fbl, /** * Do the gather convolution. For each pixels we gather multiple pixels in its neighborhood * depending on the min & max CoC tiles. - **/ + */ static void dof_gather_pass_init(EEVEE_FramebufferList *fbl, EEVEE_PassList *psl, EEVEE_TextureList *txl, @@ -792,7 +792,7 @@ static void dof_gather_pass_init(EEVEE_FramebufferList *fbl, * Filter an input buffer using a median filter to reduce noise. * NOTE: We use the holefill texture as our input to reduce memory usage. * Thus, the holefill pass cannot be filtered. - **/ + */ static void dof_filter_pass_init(EEVEE_FramebufferList *fbl, EEVEE_PassList *psl, EEVEE_EffectsInfo *fx) @@ -825,7 +825,7 @@ static void dof_filter_pass_init(EEVEE_FramebufferList *fbl, /** * Do the Scatter convolution. A sprite is emitted for every 4 pixels but is only expanded if the * pixels are bright enough to be scattered. - **/ + */ static void dof_scatter_pass_init(EEVEE_FramebufferList *fbl, EEVEE_PassList *psl, EEVEE_TextureList *txl, @@ -896,7 +896,7 @@ static void dof_scatter_pass_init(EEVEE_FramebufferList *fbl, /** * Recombine the result of the foreground and background processing. Also perform a slight out of * focus blur to improve geometric continuity. - **/ + */ static void dof_recombine_pass_init(EEVEE_FramebufferList *UNUSED(fbl), EEVEE_PassList *psl, EEVEE_EffectsInfo *fx) diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c index 37ecdb20651..485ed9273a8 100644 --- a/source/blender/draw/engines/eevee/eevee_lightcache.c +++ b/source/blender/draw/engines/eevee/eevee_lightcache.c @@ -866,7 +866,7 @@ static void eevee_lightbake_delete_resources(EEVEE_LightBake *lbake) } /* XXX Free the resources contained in the viewlayer data - * to be able to free the context before deleting the depsgraph. */ + * to be able to free the context before deleting the depsgraph. */ if (lbake->sldata) { EEVEE_view_layer_data_free(lbake->sldata); } diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index d2e0c8308c5..7dd3449ad6e 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -172,7 +172,7 @@ static void eevee_init_util_texture(void) } texels_layer += 64 * 64; - /* Copy blue noise in 3rd layer */ + /* Copy blue noise in 3rd layer. */ for (int i = 0; i < 64 * 64; i++) { texels_layer[i][0] = blue_noise[i][0]; texels_layer[i][1] = blue_noise[i][2]; @@ -181,7 +181,7 @@ static void eevee_init_util_texture(void) } texels_layer += 64 * 64; - /* Copy ltc_disk_integral in 4th layer */ + /* Copy ltc_disk_integral in 4th layer. */ for (int i = 0; i < 64 * 64; i++) { texels_layer[i][0] = ltc_disk_integral[i]; texels_layer[i][1] = 0.0; /* UNUSED */ diff --git a/source/blender/draw/engines/eevee/eevee_motion_blur.c b/source/blender/draw/engines/eevee/eevee_motion_blur.c index 0a79d9466e9..2e200c8e053 100644 --- a/source/blender/draw/engines/eevee/eevee_motion_blur.c +++ b/source/blender/draw/engines/eevee/eevee_motion_blur.c @@ -245,7 +245,7 @@ void EEVEE_motion_blur_hair_cache_populate(EEVEE_ViewLayerData *UNUSED(sldata), if (mb_data) { int mb_step = effects->motion_blur_step; - /* Store transform */ + /* Store transform. */ DRW_hair_duplimat_get(ob, psys, md, mb_data->obmat[mb_step]); EEVEE_HairMotionData *mb_hair = EEVEE_motion_blur_hair_data_get(&effects->motion_blur, ob); @@ -323,7 +323,7 @@ void EEVEE_motion_blur_cache_populate(EEVEE_ViewLayerData *UNUSED(sldata), if (mb_data) { int mb_step = effects->motion_blur_step; - /* Store transform */ + /* Store transform. */ copy_m4_m4(mb_data->obmat[mb_step], ob->obmat); EEVEE_GeometryMotionData *mb_geom = EEVEE_motion_blur_geometry_data_get(&effects->motion_blur, @@ -349,7 +349,7 @@ void EEVEE_motion_blur_cache_populate(EEVEE_ViewLayerData *UNUSED(sldata), } /* Avoid drawing object that has no motions since object_moves is always true. */ - if (!mb_geom->use_deform && /* Object deformation can happen without transform. */ + if (!mb_geom->use_deform && /* Object deformation can happen without transform. */ equals_m4m4(mb_data->obmat[MB_PREV], mb_data->obmat[MB_CURR]) && equals_m4m4(mb_data->obmat[MB_NEXT], mb_data->obmat[MB_CURR])) { return; diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index bc04fe024fc..ab297620afe 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -565,7 +565,7 @@ typedef struct EEVEE_LightsInfo { /* Update bitmap. */ BLI_bitmap sh_cube_update[BLI_BITMAP_SIZE(MAX_SHADOW_CUBE)]; /* Lights tracking */ - struct BoundSphere shadow_bounds[MAX_LIGHT]; /* Tightly packed light bounds */ + struct BoundSphere shadow_bounds[MAX_LIGHT]; /* Tightly packed light bounds. */ /* List of bbox and update bitmap. Double buffered. */ struct EEVEE_ShadowCasterBuffer *shcaster_frontbuffer, *shcaster_backbuffer; /* AABB of all shadow casters combined. */ diff --git a/source/blender/draw/engines/eevee/eevee_shaders.c b/source/blender/draw/engines/eevee/eevee_shaders.c index 90b7eeb9293..a4e4352ac16 100644 --- a/source/blender/draw/engines/eevee/eevee_shaders.c +++ b/source/blender/draw/engines/eevee/eevee_shaders.c @@ -1274,7 +1274,7 @@ Material *EEVEE_material_default_error_get(void) return e_data.error_mat; } -/* Configure a default nodetree with the given material. */ +/* Configure a default nodetree with the given material. */ struct bNodeTree *EEVEE_shader_default_surface_nodetree(Material *ma) { /* WARNING: This function is not threadsafe. Which is not a problem for the moment. */ @@ -1302,7 +1302,7 @@ struct bNodeTree *EEVEE_shader_default_surface_nodetree(Material *ma) return e_data.surface.ntree; } -/* Configure a default nodetree with the given world. */ +/* Configure a default nodetree with the given world. */ struct bNodeTree *EEVEE_shader_default_world_nodetree(World *wo) { /* WARNING: This function is not threadsafe. Which is not a problem for the moment. */ diff --git a/source/blender/draw/engines/eevee/eevee_shadows.c b/source/blender/draw/engines/eevee/eevee_shadows.c index 6a98c3316f3..5060c209b8b 100644 --- a/source/blender/draw/engines/eevee/eevee_shadows.c +++ b/source/blender/draw/engines/eevee/eevee_shadows.c @@ -247,7 +247,7 @@ void EEVEE_shadows_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) sldata->shadow_fb = GPU_framebuffer_create("shadow_fb"); } - /* Gather all light own update bits. to avoid costly intersection check. */ + /* Gather all light own update bits. to avoid costly intersection check. */ for (int j = 0; j < linfo->cube_len; j++) { const EEVEE_Light *evli = linfo->light_data + linfo->shadow_cube_light_indices[j]; /* Setup shadow cube in UBO and tag for update if necessary. */ diff --git a/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl b/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl index cdc453eed40..d4e3b879426 100644 --- a/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl @@ -338,7 +338,7 @@ float diffuse_occlusion( * radius2 : Second caps’ radius (in radians) * dist : Distance between caps (radians between centers of caps) * Note: Result is divided by pi to save one multiply. - **/ + */ float spherical_cap_intersection(float radius1, float radius2, float dist) { /* From "Ambient Aperture Lighting" by Chris Oat @@ -407,7 +407,7 @@ OcclusionData occlusion_load(vec3 vP, float custom_occlusion) data = unpack_occlusion_data(texelFetch(horizonBuffer, ivec2(gl_FragCoord.xy), 0)); } #else - /* For blended surfaces. */ + /* For blended surfaces. */ data = occlusion_search(vP, maxzBuffer, aoDistance, 0.0, 8.0); #endif diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_sampling_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_sampling_lib.glsl index 7ce95a4aff2..4fcfac36376 100644 --- a/source/blender/draw/engines/eevee/shaders/bsdf_sampling_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/bsdf_sampling_lib.glsl @@ -1,7 +1,7 @@ /** * Sampling distribution routines for Monte-carlo integration. - **/ + */ #pragma BLENDER_REQUIRE(common_math_geom_lib.glsl) #pragma BLENDER_REQUIRE(bsdf_common_lib.glsl) diff --git a/source/blender/draw/engines/eevee/shaders/btdf_lut_frag.glsl b/source/blender/draw/engines/eevee/shaders/btdf_lut_frag.glsl index 2f1298e2707..c8c3fa548fc 100644 --- a/source/blender/draw/engines/eevee/shaders/btdf_lut_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/btdf_lut_frag.glsl @@ -83,7 +83,7 @@ void main() btdf_accum = 0.0; } - /* There is place to put multiscater result (which is a little bit different still) - * and / or lobe fitting for better sampling of */ + /* There is place to put multi-scatter result (which is a little bit different still) + * and / or lobe fitting for better sampling of. */ FragColor = vec4(btdf_accum, fresnel_accum, 0.0, 1.0); } diff --git a/source/blender/draw/engines/eevee/shaders/closure_eval_lib.glsl b/source/blender/draw/engines/eevee/shaders/closure_eval_lib.glsl index 94dd1a439db..e5cbc487e93 100644 --- a/source/blender/draw/engines/eevee/shaders/closure_eval_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/closure_eval_lib.glsl @@ -19,7 +19,7 @@ * CLOSURE_EVAL_FUNCTION_3(name, Diffuse, Glossy, Refraction); * // Get the cl_out * closure.radiance = out_Diffuse_0.radiance + out_Glossy_1.radiance + out_Refraction_2.radiance; - **/ + */ #define CLOSURE_VARS_DECLARE(t0, t1, t2, t3) \ ClosureInputCommon in_common = CLOSURE_INPUT_COMMON_DEFAULT; \ @@ -291,7 +291,7 @@ ClosurePlanarData closure_planar_eval_init(inout ClosureEvalCommon cl_common) ClosurePlanarData planar; planar.attenuation = 0.0; - /* Find planar with the maximum weight. TODO(fclem) */ + /* TODO(fclem): Find planar with the maximum weight. */ for (int i = 0; i < prbNumPlanar && i < MAX_PLANAR; i++) { float attenuation = probe_attenuation_planar(planars_data[i], cl_common.P); if (attenuation > planar.attenuation) { diff --git a/source/blender/draw/engines/eevee/shaders/common_utiltex_lib.glsl b/source/blender/draw/engines/eevee/shaders/common_utiltex_lib.glsl index 821859b3228..c3325ec4286 100644 --- a/source/blender/draw/engines/eevee/shaders/common_utiltex_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/common_utiltex_lib.glsl @@ -27,7 +27,7 @@ const float lut_btdf_layer_count = 16.0; * x : Uniformly distributed value [0..1] (noise 1). * y : Uniformly distributed value [0..1] (noise 2). * z,w : Uniformly distributed point on the unit circle [-1..1] (noise 3). - **/ + */ #define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) /* Return texture coordinates to sample Surface LUT. */ diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_bokeh_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_bokeh_frag.glsl index 40e4c5a313e..5fd00986adc 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_bokeh_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_bokeh_frag.glsl @@ -5,7 +5,7 @@ * a perfect circle. * We correct samples spacing for polygonal bokeh shapes. However, we do not for anamorphic bokeh * as it is way more complex and expensive to do. - **/ + */ #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_dilate_tiles_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_dilate_tiles_frag.glsl index 22e6f929f36..0cbf92466aa 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_dilate_tiles_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_dilate_tiles_frag.glsl @@ -2,7 +2,7 @@ /** * Tile dilate pass: Takes the 8x8 Tiles buffer and converts dilates the tiles with large CoC to * their neighborhood. This pass is repeated multiple time until the maximum CoC can be covered. - **/ + */ #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_downsample_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_downsample_frag.glsl index c477e0f6eb8..c33eda0acd2 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_downsample_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_downsample_frag.glsl @@ -4,7 +4,7 @@ * * Pretty much identical to the setup pass but get CoC from buffer. Also does not * weight luma for the bilateral weights. - **/ + */ #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_filter_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_filter_frag.glsl index 78c80438f60..aa72cda4fb7 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_filter_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_filter_frag.glsl @@ -4,7 +4,7 @@ * * This is a simple 3x3 median filter to avoid dilating highlights with a 3x3 max filter even if * cheaper. - **/ + */ #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_flatten_tiles_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_flatten_tiles_frag.glsl index bd81171c759..48195a1daea 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_flatten_tiles_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_flatten_tiles_frag.glsl @@ -5,7 +5,7 @@ * Output min and max values for each tile and for both foreground & background. * Also outputs min intersectable CoC for the background, which is the minimum CoC * that comes from the background pixels. - **/ + */ #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_gather_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_gather_frag.glsl index 8c2633084db..39a7e8fb931 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_gather_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_gather_frag.glsl @@ -7,7 +7,7 @@ * * We sample using an octaweb sampling pattern. We randomize the kernel center and each ring * rotation to ensure maximum coverage. - **/ + */ #pragma BLENDER_REQUIRE(common_utiltex_lib.glsl) #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl index dac53719149..da34b221104 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl @@ -395,7 +395,7 @@ void dof_gather_accumulate_sample_pair(DofGatherData pair_data[2], /** * If a CoC is larger than bordering radius we accumulate it to the general accumulator. * If not, we accumulate to the ring bucket. This is to have more consistent sample occlusion. - **/ + */ float accum_weight = dof_gather_accum_weight(pair_data[i].coc, bordering_radius, first_ring); dof_gather_accumulate_sample(pair_data[i], weight * accum_weight, accum_data); dof_gather_accumulate_sample(pair_data[i], weight * (1.0 - accum_weight), ring_data); @@ -607,7 +607,7 @@ ivec2 dof_square_ring_sample_offset(int ring_distance, int sample_id) * . . . . . * * Samples are expected to be mirrored to complete the pattern. - **/ + */ ivec2 offset; if (sample_id < ring_distance) { offset.x = ring_distance; diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_reduce_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_reduce_frag.glsl index 51a139ad343..1b5b305dfc1 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_reduce_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_reduce_frag.glsl @@ -2,14 +2,14 @@ /** * Reduce pass: Downsample the color buffer to generate mipmaps. * Also decide if a pixel is to be convolved by scattering or gathering during the first pass. - **/ + */ #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) /** Inputs: * COPY_PASS: Is output of setup pass (halfres) and downsample pass (quarter res). * REDUCE_PASS: Is previous Gather input miplvl (halfres >> miplvl). - **/ + */ uniform sampler2D colorBuffer; uniform sampler2D cocBuffer; uniform sampler2D downsampledBuffer; @@ -23,7 +23,7 @@ uniform float colorNeighborClamping; /** Outputs: * COPY_PASS: Gather input mip0. * REDUCE_PASS: Is next Gather input miplvl (halfres >> miplvl). - **/ + */ layout(location = 0) out vec4 outColor; layout(location = 1) out float outCoc; diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl index 32841b7749c..57027c71156 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl @@ -34,7 +34,7 @@ out vec4 fragColor; void dof_slight_focus_gather(float radius, out vec4 out_color, out float out_weight) { - /* offset coord to avoid correlation with sampling pattern. */ + /* offset coord to avoid correlation with sampling pattern. */ vec4 noise = texelfetch_noise_tex(gl_FragCoord.xy + 7.0); DofGatherData fg_accum = GATHER_DATA_INIT; @@ -199,7 +199,7 @@ void main(void) fragColor = fragColor * (1.0 - layer_weight) + layer_color; } - /* Fix float precision issue in alpha compositing. */ + /* Fix float precision issue in alpha compositing. */ if (fragColor.a > 0.99) { fragColor.a = 1.0; } diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_scatter_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_scatter_frag.glsl index 704bbf6d999..06dcbeaed66 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_scatter_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_scatter_frag.glsl @@ -4,7 +4,7 @@ * * We only scatter one triangle per sprite and one sprite per 4 pixels to reduce vertex shader * invocations and overdraw. - **/ + */ #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_setup_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_setup_frag.glsl index d1ecc0fc244..235145b221b 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_setup_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_setup_frag.glsl @@ -4,7 +4,7 @@ * * An addition to the downsample CoC, we output the maximum slight out of focus CoC to be * sure we don't miss a pixel. - **/ + */ #pragma BLENDER_REQUIRE(effect_dof_lib.glsl) diff --git a/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl b/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl index c9b5d0dea36..a648e7a8b26 100644 --- a/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl @@ -208,7 +208,7 @@ vec3 probe_evaluate_planar(int id, PlanarData pd, vec3 P, vec3 N, vec3 V, float /* 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. */ + /* 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; return radiance; diff --git a/source/blender/draw/engines/eevee/shaders/random_lib.glsl b/source/blender/draw/engines/eevee/shaders/random_lib.glsl index 25a3e0f56b4..3a4ae257bbe 100644 --- a/source/blender/draw/engines/eevee/shaders/random_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/random_lib.glsl @@ -1,7 +1,7 @@ /** * Random numbers and low discrepency sequences utilities. - **/ + */ #pragma BLENDER_REQUIRE(common_math_lib.glsl) diff --git a/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl b/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl index 1b2135646c9..f1476e4f2c4 100644 --- a/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl @@ -90,7 +90,7 @@ ScreenSpaceRay raytrace_screenspace_ray_create(Ray ray, float thickness) } struct RayTraceParameters { - /** ViewSpace thickness the objects */ + /** ViewSpace thickness the objects. */ float thickness; /** Jitter along the ray to avoid banding artifact when steps are too large. */ float jitter; diff --git a/source/blender/draw/engines/eevee/shaders/surface_lib.glsl b/source/blender/draw/engines/eevee/shaders/surface_lib.glsl index 0acb35b2399..0efa7b80b0b 100644 --- a/source/blender/draw/engines/eevee/shaders/surface_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/surface_lib.glsl @@ -1,4 +1,4 @@ -/** This describe the entire interface of the shader. */ +/** This describe the entire interface of the shader. */ #define SURFACE_INTERFACE \ vec3 worldPosition; \ diff --git a/source/blender/draw/engines/eevee/shaders/volumetric_lib.glsl b/source/blender/draw/engines/eevee/shaders/volumetric_lib.glsl index 788e621c3c1..c48c3bffaef 100644 --- a/source/blender/draw/engines/eevee/shaders/volumetric_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/volumetric_lib.glsl @@ -70,7 +70,7 @@ vec3 light_volume(LightData ld, vec4 l_vector) * Using "Point Light Attenuation Without Singularity" from Cem Yuksel * http://www.cemyuksel.com/research/pointlightattenuation/pointlightattenuation.pdf * http://www.cemyuksel.com/research/pointlightattenuation/ - **/ + */ float d = l_vector.w; float d_sqr = sqr(d); float r_sqr = ld.l_volume_radius; diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index af8b029a08e..8a2aebc95ab 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -102,7 +102,7 @@ GPENCIL_tObject *gpencil_object_cache_add(GPENCIL_PrivateData *pd, Object *ob) transpose_m4(mat); /* mat is now a "normal" matrix which will transform - * BBox space normal to world space. */ + * BBox space normal to world space. */ mul_mat3_m4_v3(mat, tgp_ob->plane_normal); normalize_v3(tgp_ob->plane_normal); diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index 32884eb9e3f..1921055c3d7 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -320,7 +320,7 @@ void GPENCIL_cache_init(void *ved) float focal_len = cam->lens; const float scale_camera = 0.001f; - /* we want radius here for the aperture number */ + /* We want radius here for the aperture number. */ float aperture = 0.5f * scale_camera * focal_len / fstop; float focal_len_scaled = scale_camera * focal_len; float sensor_scaled = scale_camera * sensor; diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_antialiasing_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_antialiasing_frag.glsl index b512b54e392..7758fdceb46 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_antialiasing_frag.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_antialiasing_frag.glsl @@ -17,7 +17,7 @@ out vec2 fragColor; #elif SMAA_STAGE == 1 out vec4 fragColor; #elif SMAA_STAGE == 2 -/* Reminder: Blending func is fragRevealage * DST + fragColor .*/ +/* Reminder: Blending func is `fragRevealage * DST + fragColor`. */ layout(location = 0, index = 0) out vec4 outColor; layout(location = 0, index = 1) out vec4 outReveal; #endif 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 ac48b94fea9..0f670532349 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl @@ -238,7 +238,7 @@ in vec4 pos; /* Prev adj vert */ in vec4 pos1; /* Current edge */ in vec4 pos2; /* Current edge */ in vec4 pos3; /* Next adj vert */ -/* xy is UV for fills, z is U of stroke, w is strength. */ +/* xy is UV for fills, z is U of stroke, w is strength. */ in vec4 uv1; in vec4 uv2; in vec4 col1; diff --git a/source/blender/draw/engines/image/shaders/engine_image_frag.glsl b/source/blender/draw/engines/image/shaders/engine_image_frag.glsl index 2bccf0d99b5..55a2f2a72f1 100644 --- a/source/blender/draw/engines/image/shaders/engine_image_frag.glsl +++ b/source/blender/draw/engines/image/shaders/engine_image_frag.glsl @@ -28,7 +28,7 @@ in vec2 uvs; out vec4 fragColor; #ifdef TILED_IMAGE -/* TODO(fclem): deduplicate code. */ +/* TODO(fclem): deduplicate code. */ bool node_tex_tile_lookup(inout vec3 co, sampler2DArray ima, sampler1DArray map) { vec2 tile_pos = floor(co.xy); diff --git a/source/blender/draw/engines/overlay/overlay_armature.c b/source/blender/draw/engines/overlay/overlay_armature.c index e6c3248b6c4..0e350ea5a68 100644 --- a/source/blender/draw/engines/overlay/overlay_armature.c +++ b/source/blender/draw/engines/overlay/overlay_armature.c @@ -1889,7 +1889,7 @@ static void draw_bone_name(ArmatureDrawContext *ctx, bool highlight = (pchan && (arm->flag & ARM_POSEMODE) && (boneflag & BONE_SELECTED)) || (eBone && (eBone->flag & BONE_SELECTED)); - /* Color Management: Exception here as texts are drawn in sRGB space directly. */ + /* Color Management: Exception here as texts are drawn in sRGB space directly. */ UI_GetThemeColor4ubv(highlight ? TH_TEXT_HI : TH_TEXT, color); float *head = pchan ? pchan->pose_head : eBone->head; diff --git a/source/blender/draw/engines/overlay/overlay_edit_uv.c b/source/blender/draw/engines/overlay/overlay_edit_uv.c index 9c58a2b574f..01ab47ac1de 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_uv.c +++ b/source/blender/draw/engines/overlay/overlay_edit_uv.c @@ -325,7 +325,7 @@ void OVERLAY_edit_uv_cache_init(OVERLAY_Data *vedata) if (pd->edit_uv.do_tiled_image_overlay) { struct DRWTextStore *dt = DRW_text_cache_ensure(); uchar color[4]; - /* Color Management: Exception here as texts are drawn in sRGB space directly. */ + /* Color Management: Exception here as texts are drawn in sRGB space directly. */ UI_GetThemeColorShade4ubv(TH_BACK, 60, color); char text[16]; LISTBASE_FOREACH (ImageTile *, tile, &image->tiles) { diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c index 2e1c0165513..b70c71de188 100644 --- a/source/blender/draw/engines/overlay/overlay_extra.c +++ b/source/blender/draw/engines/overlay/overlay_extra.c @@ -887,7 +887,7 @@ static void camera_view3d_reconstruction(OVERLAY_ExtraCallBuffers *cb, float *bundle_color_solid = G_draw.block.colorBundleSolid; float *bundle_color_unselected = G_draw.block.colorWire; uchar text_color_selected[4], text_color_unselected[4]; - /* Color Management: Exception here as texts are drawn in sRGB space directly. */ + /* Color Management: Exception here as texts are drawn in sRGB space directly. */ UI_GetThemeColor4ubv(TH_SELECT, text_color_selected); UI_GetThemeColor4ubv(TH_TEXT, text_color_unselected); @@ -1544,7 +1544,7 @@ static void OVERLAY_object_name(Object *ob, int theme_id) { struct DRWTextStore *dt = DRW_text_cache_ensure(); uchar color[4]; - /* Color Management: Exception here as texts are drawn in sRGB space directly. */ + /* Color Management: Exception here as texts are drawn in sRGB space directly. */ UI_GetThemeColor4ubv(theme_id, color); DRW_text_cache_add(dt, diff --git a/source/blender/draw/engines/overlay/overlay_motion_path.c b/source/blender/draw/engines/overlay/overlay_motion_path.c index a92f11aca38..e19d99dc597 100644 --- a/source/blender/draw/engines/overlay/overlay_motion_path.c +++ b/source/blender/draw/engines/overlay/overlay_motion_path.c @@ -177,7 +177,7 @@ static void motion_path_cache(OVERLAY_Data *vedata, if (show_frame_no || (show_keyframes_no && show_keyframes)) { int i; uchar col[4], col_kf[4]; - /* Color Management: Exception here as texts are drawn in sRGB space directly. */ + /* Color Management: Exception here as texts are drawn in sRGB space directly. */ UI_GetThemeColor3ubv(TH_TEXT_HI, col); UI_GetThemeColor3ubv(TH_VERTEX_SELECT, col_kf); col[3] = col_kf[3] = 255; diff --git a/source/blender/draw/engines/overlay/overlay_outline.c b/source/blender/draw/engines/overlay/overlay_outline.c index f1467ff9794..a2c3b5bf4aa 100644 --- a/source/blender/draw/engines/overlay/overlay_outline.c +++ b/source/blender/draw/engines/overlay/overlay_outline.c @@ -77,7 +77,7 @@ static void gpencil_depth_plane(Object *ob, float r_plane[4]) transpose_m4(mat); /* mat is now a "normal" matrix which will transform - * BBox space normal to world space. */ + * BBox space normal to world space. */ mul_mat3_m4_v3(mat, r_plane); normalize_v3(r_plane); diff --git a/source/blender/draw/engines/overlay/overlay_private.h b/source/blender/draw/engines/overlay/overlay_private.h index 969289a3219..a48b46a61fc 100644 --- a/source/blender/draw/engines/overlay/overlay_private.h +++ b/source/blender/draw/engines/overlay/overlay_private.h @@ -358,7 +358,7 @@ typedef struct OVERLAY_PrivateData { bool select_vert; bool select_face; bool select_edge; - int flag; /** Copy of v3d->overlay.edit_flag. */ + int flag; /** Copy of #v3d->overlay.edit_flag. */ } edit_mesh; struct { bool use_weight; diff --git a/source/blender/draw/engines/overlay/shaders/extra_vert.glsl b/source/blender/draw/engines/overlay/shaders/extra_vert.glsl index 74854dc0f8d..59c9d0a665d 100644 --- a/source/blender/draw/engines/overlay/shaders/extra_vert.glsl +++ b/source/blender/draw/engines/overlay/shaders/extra_vert.glsl @@ -162,13 +162,13 @@ void main() int color_class = int(floor(color.r)); float color_intensity = fract(color.r); switch (color_class) { - case 0: /* No eye (convergence plane) */ + case 0: /* No eye (convergence plane). */ finalColor = vec4(1.0, 1.0, 1.0, 1.0); break; - case 1: /* Left eye */ + case 1: /* Left eye. */ finalColor = vec4(0.0, 1.0, 1.0, 1.0); break; - case 2: /* Right eye */ + case 2: /* Right eye. */ finalColor = vec4(1.0, 0.0, 0.0, 1.0); break; } @@ -207,7 +207,7 @@ void main() vec3 n1 = normalize(cross(edge, world_pos - p1)); bool persp = (ProjectionMatrix[3][3] == 0.0); vec3 V = (persp) ? normalize(ViewMatrixInverse[3].xyz - world_pos) : ViewMatrixInverse[2].xyz; - /* Discard non-silhouete edges. */ + /* Discard non-silhouette edges. */ bool facing0 = dot(n0, V) > 0.0; bool facing1 = dot(n1, V) > 0.0; if (facing0 == facing1) { diff --git a/source/blender/draw/engines/workbench/shaders/workbench_common_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_common_lib.glsl index 122c99ca536..8cbc8608f5b 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_common_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_common_lib.glsl @@ -59,7 +59,7 @@ void workbench_float_pair_decode(float data, out float v1, out float v2) { // const uint v1_mask = ~(0xFFFFFFFFu << ROUGHNESS_BITS); // const uint v2_mask = ~(0xFFFFFFFFu << METALLIC_BITS); - /* Same as above because some compiler are very dumb and think we use medium int. */ + /* Same as above because some compiler are very dumb and think we use medium int. */ const int v1_mask = 0x1F; const int v2_mask = 0x7; int idata = int(data); diff --git a/source/blender/draw/engines/workbench/shaders/workbench_data_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_data_lib.glsl index a76a14fa750..2e229d4d83a 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_data_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_data_lib.glsl @@ -12,7 +12,7 @@ struct WorldData { float shadow_shift; float shadow_mul; float shadow_add; - /* - 16 bytes alignment- */ + /* - 16 bytes alignment - */ LightData lights[4]; vec4 ambient_color; diff --git a/source/blender/draw/engines/workbench/shaders/workbench_image_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_image_lib.glsl index 690ba1b92bc..57d648d3565 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_image_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_image_lib.glsl @@ -1,5 +1,5 @@ -/* TODO(fclem): deduplicate code. */ +/* TODO(fclem): deduplicate code. */ bool node_tex_tile_lookup(inout vec3 co, sampler2DArray ima, sampler1DArray map) { vec2 tile_pos = floor(co.xy); diff --git a/source/blender/draw/engines/workbench/workbench_effect_dof.c b/source/blender/draw/engines/workbench/workbench_effect_dof.c index a00453fe125..2261790226a 100644 --- a/source/blender/draw/engines/workbench/workbench_effect_dof.c +++ b/source/blender/draw/engines/workbench/workbench_effect_dof.c @@ -157,7 +157,7 @@ void workbench_dof_engine_init(WORKBENCH_Data *vedata) const float *full_size = DRW_viewport_size_get(); const int size[2] = {max_ii(1, (int)full_size[0] / 2), max_ii(1, (int)full_size[1] / 2)}; #if 0 /* TODO(fclem): finish COC min_max optimization. */ - /* NOTE: We Ceil here in order to not miss any edge texel if using a NPO2 texture. */ + /* NOTE: We Ceil here in order to not miss any edge texel if using a NPO2 texture. */ int shrink_h_size[2] = {ceilf(size[0] / 8.0f), size[1]}; int shrink_w_size[2] = {shrink_h_size[0], ceilf(size[1] / 8.0f)}; #endif @@ -218,9 +218,9 @@ void workbench_dof_engine_init(WORKBENCH_Data *vedata) float focus_dist = BKE_camera_object_dof_distance(camera); float focal_len = cam->lens; - /* TODO(fclem): deduplicate with eevee */ + /* TODO(fclem): de-duplicate with EEVEE. */ const float scale_camera = 0.001f; - /* we want radius here for the aperture number */ + /* We want radius here for the aperture number. */ float aperture = 0.5f * scale_camera * focal_len / fstop; float focal_len_scaled = scale_camera * focal_len; float sensor_scaled = scale_camera * sensor; diff --git a/source/blender/draw/engines/workbench/workbench_volume.c b/source/blender/draw/engines/workbench/workbench_volume.c index ddda6d7b58e..daeadce3059 100644 --- a/source/blender/draw/engines/workbench/workbench_volume.c +++ b/source/blender/draw/engines/workbench/workbench_volume.c @@ -125,7 +125,7 @@ static void workbench_volume_modifier_cache_populate(WORKBENCH_Data *vedata, fds->slice_axis - 1; float dim[3]; BKE_object_dimensions_get(ob, dim); - /* 0.05f to achieve somewhat the same opacity as the full view. */ + /* 0.05f to achieve somewhat the same opacity as the full view. */ float step_length = max_ff(1e-16f, dim[axis] * 0.05f); grp = DRW_shgroup_create(sh, vedata->psl->volume_ps); @@ -266,7 +266,7 @@ static void workbench_volume_object_cache_populate(WORKBENCH_Data *vedata, float dim[3]; BKE_object_dimensions_get(ob, dim); - /* 0.05f to achieve somewhat the same opacity as the full view. */ + /* 0.05f to achieve somewhat the same opacity as the full view. */ float step_length = max_ff(1e-16f, dim[axis] * 0.05f); const float slice_position = volume->display.slice_depth; -- cgit v1.2.3