Three features;
- Live scanline updates while rendering Using a timer system, each second now the tiles that are being processed are checked if they could use display. To make this work pretty, I had to use the threaded 'tile processor' for a single thread too, but that's now proven to be stable. Also note that these updates draw per layer, including ztransp progress separately from solid render. - Recode of ztransp OSA Until now (since blender 1.0) the ztransp part was fully rendered and added on top of the solid part with alpha-over. This adding was done before the solid part applied sub-pixel sample filtering, causing the ztransp layer to be always too blurry. Now the ztransp layer uses same sub=pixel filter, resulting in the same AA level (and filter results) as the solid part. Quite noticable with hair renders. - Vector buffer support & preliminary vector-blur Node Using the "Render Layer" panel "Vector" pass button, the motion vectors per pixel are calculated and stored. Accessible via the Compositor. The vector-blur node is horrible btw! It just uses the length of the vector to apply a filter like with current (z)blur. I'm committing it anyway, I'll experiment with it further, and who knows some surprise code shows up!
This commit is contained in:
@@ -721,10 +721,23 @@ static void renderwin_clear_display_cb(RenderResult *rr)
|
||||
*/
|
||||
|
||||
/* can get as well the full picture, as the parts while rendering */
|
||||
static void renderwin_progress(RenderWin *rw, RenderResult *rr, rcti *unused)
|
||||
static void renderwin_progress(RenderWin *rw, RenderResult *rr, rcti *renrect)
|
||||
{
|
||||
rcti win_rct;
|
||||
float *rectf, fullrect[2][2];
|
||||
int ymin, ymax;
|
||||
|
||||
/* if renrect argument, we only display scanlines */
|
||||
if(renrect) {
|
||||
ymin= renrect->ymin;
|
||||
ymax= renrect->ymax-ymin;
|
||||
if(ymax<2) return;
|
||||
renrect->ymin= renrect->ymax;
|
||||
}
|
||||
else {
|
||||
ymin= 0;
|
||||
ymax= rr->recty-2*rr->crop;
|
||||
}
|
||||
|
||||
/* renderwindow cruft */
|
||||
win_rct.xmin= win_rct.ymin= 0;
|
||||
@@ -736,9 +749,13 @@ static void renderwin_progress(RenderWin *rw, RenderResult *rr, rcti *unused)
|
||||
if(rr->rectf)
|
||||
rectf= rr->rectf;
|
||||
else {
|
||||
RenderLayer *rl= BLI_findlink(&rr->layers, rr->actlay);
|
||||
RenderLayer *rl= rr->renlay;
|
||||
if(rl==NULL) return;
|
||||
rectf= rl->rectf;
|
||||
}
|
||||
}
|
||||
/* if scanline updates... */
|
||||
rectf+= 4*rr->rectx*ymin;
|
||||
|
||||
/* when rendering more pixels than needed, we crop away cruft */
|
||||
if(rr->crop)
|
||||
rectf+= 4*(rr->crop*rr->rectx + rr->crop);
|
||||
@@ -746,14 +763,14 @@ static void renderwin_progress(RenderWin *rw, RenderResult *rr, rcti *unused)
|
||||
/* tilerect defines drawing offset from (0,0) */
|
||||
/* however, tilerect (xmin, ymin) is first pixel */
|
||||
fullrect[0][0] += (rr->tilerect.xmin+rr->crop)*rw->zoom;
|
||||
fullrect[0][1] += (rr->tilerect.ymin+rr->crop)*rw->zoom;
|
||||
fullrect[0][1] += (rr->tilerect.ymin+rr->crop + ymin)*rw->zoom;
|
||||
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
glaDefine2DArea(&win_rct);
|
||||
|
||||
glDrawBuffer(GL_FRONT);
|
||||
glPixelZoom(rw->zoom, rw->zoom);
|
||||
glaDrawPixelsSafe(fullrect[0][0], fullrect[0][1], rr->rectx-2*rr->crop, rr->recty-2*rr->crop, rr->rectx,
|
||||
glaDrawPixelsSafe(fullrect[0][0], fullrect[0][1], rr->rectx-2*rr->crop, ymax, rr->rectx,
|
||||
GL_RGBA, GL_FLOAT, rectf);
|
||||
glPixelZoom(1.0, 1.0);
|
||||
glFlush();
|
||||
|
||||
Reference in New Issue
Block a user