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.
This commit is contained in:
parent
74c896c081
commit
1705587e21
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
|
||||
/** \file
|
||||
* \ingroup render
|
||||
*
|
||||
* \note Some of this logic has been duplicated in `COM_VectorBlurOperation.cc`
|
||||
* changes here may also apply also apply to that file.
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in New Issue