diff options
author | Campbell Barton <campbell@blender.org> | 2022-01-10 05:47:13 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-01-10 05:47:13 +0300 |
commit | 1705587e21bc62f67a0aa297769853e1903d2a44 (patch) | |
tree | 2956cf6b4163a6c6e36bafb8682fc3aea48ab4b2 /source/blender/compositor/operations | |
parent | 74c896c0819bd95004b0b11925d51586570f980f (diff) |
Cleanup: note that compositor vector blur shares logic with zbuf.c
Note that some functions have been copied between these files.
De-duplication isn't trivial as there are differences in some functions.
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_VectorBlurOperation.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cc b/source/blender/compositor/operations/COM_VectorBlurOperation.cc index e34b629f457..1d097b37ca5 100644 --- a/source/blender/compositor/operations/COM_VectorBlurOperation.cc +++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cc @@ -180,8 +180,13 @@ void VectorBlurOperation::generate_vector_blur(float *data, inputZ->get_buffer()); } -/* ****************** Spans ******************************* */ -/* span fill in method, is also used to localize data for zbuffering */ +/* -------------------------------------------------------------------- */ +/** \name Spans + * + * Duplicated logic from `zbuf.c`. + * \{ */ + +/** Span fill in method, is also used to localize data for Z-buffering. */ struct ZSpan { /* range for clipping */ int rectx, recty; @@ -327,11 +332,13 @@ static void zbuf_add_to_span(ZSpan *zspan, const float v1[2], const float v2[2]) } for (y = my2; y >= my0; y--, xs0 += dx0) { - /* xs0 is the xcoord! */ + /* xs0 is the X-coordinate! */ span[y] = xs0; } } +/** \} */ + /* ******************** VECBLUR ACCUM BUF ************************* */ struct DrawBufPixel { @@ -339,6 +346,9 @@ struct DrawBufPixel { float alpha; }; +/** + * \note Near duplicate of `zspan_scanconvert` in `zbuf.c` with some minor adjustments. + */ static void zbuf_fill_in_rgba( ZSpan *zspan, DrawBufPixel *col, float *v1, float *v2, float *v3, float *v4) { |