Bugfix #4736
Composite: the Translate Node only worked in some cases (pixel processor call), and not for: - filter - seperate rgba - conversion of buffer types (value to rgba etc) Blur still doesn't either, but that code is too optimized to add quick. Will put on todo for checking on better unification of translations.
This commit is contained in:
@@ -220,6 +220,10 @@ static CompBuf *typecheck_compbuf(CompBuf *inbuf, int type)
|
||||
float *outrf= outbuf->rect;
|
||||
int x= inbuf->x*inbuf->y;
|
||||
|
||||
/* warning note: xof and yof are applied in pixelprocessor, but should be copied otherwise? */
|
||||
outbuf->xof= inbuf->xof;
|
||||
outbuf->yof= inbuf->yof;
|
||||
|
||||
if(type==CB_VAL && inbuf->type==CB_VEC3) {
|
||||
for(; x>0; x--, outrf+= 1, inrf+= 3)
|
||||
*outrf= 0.333333f*(inrf[0]+inrf[1]+inrf[2]);
|
||||
@@ -423,6 +427,10 @@ static CompBuf *valbuf_from_rgbabuf(CompBuf *cbuf, int channel)
|
||||
float *valf, *rectf;
|
||||
int tot;
|
||||
|
||||
/* warning note: xof and yof are applied in pixelprocessor, but should be copied otherwise? */
|
||||
valbuf->xof= cbuf->xof;
|
||||
valbuf->yof= cbuf->yof;
|
||||
|
||||
valf= valbuf->rect;
|
||||
|
||||
/* defaults to returning alpha channel */
|
||||
@@ -1642,6 +1650,10 @@ static void node_composit_exec_filter(void *data, bNode *node, bNodeStack **in,
|
||||
CompBuf *cbuf= in[1]->data;
|
||||
CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 1); // allocs
|
||||
|
||||
/* warning note: xof and yof are applied in pixelprocessor, but should be copied otherwise? */
|
||||
stackbuf->xof= cbuf->xof;
|
||||
stackbuf->yof= cbuf->yof;
|
||||
|
||||
switch(node->custom1) {
|
||||
case CMP_FILT_SOFT:
|
||||
do_filter3(stackbuf, cbuf, soft, in[0]->vec[0]);
|
||||
|
||||
Reference in New Issue
Block a user