diff options
author | Ton Roosendaal <ton@blender.org> | 2006-02-01 00:49:05 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-02-01 00:49:05 +0300 |
commit | 5e3170fafd0a64d562c5c9e94af42136e8e98af6 (patch) | |
tree | ec721bb3fbeeb9c30dd377b8098f744146ddc18c /source/blender/src | |
parent | 397ee6768dca9e4696c608c7731f050ce4440802 (diff) |
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!
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/editnode.c | 2 | ||||
-rw-r--r-- | source/blender/src/renderwin.c | 27 |
2 files changed, 23 insertions, 6 deletions
diff --git a/source/blender/src/editnode.c b/source/blender/src/editnode.c index 84354859067..c192d801b65 100644 --- a/source/blender/src/editnode.c +++ b/source/blender/src/editnode.c @@ -1178,7 +1178,7 @@ static void node_add_menu(SpaceNode *snode) } else if(snode->treetype==NTREE_COMPOSIT) { /* compo menu, still hardcoded defines... solve */ - event= pupmenu("Add Node%t|Render Result %x221|Composite %x222|Viewer%x201|Image %x220|RGB Curves%x209|AlphaOver %x210|Blur %x211|Filter %x212|Value %x203|Color %x202|Mix %x204|ColorRamp %x205|Color to BW %x206|Map Value %x213|Normal %x207"); + event= pupmenu("Add Node%t|Render Result %x221|Composite %x222|Viewer%x201|Image %x220|RGB Curves%x209|AlphaOver %x210|Blur %x211|Vector Blur %x215|Filter %x212|Value %x203|Color %x202|Mix %x204|ColorRamp %x205|Color to BW %x206|Map Value %x213|Normal %x207"); if(event<1) return; } else return; diff --git a/source/blender/src/renderwin.c b/source/blender/src/renderwin.c index 579dc8b892a..8b2c0093b3e 100644 --- a/source/blender/src/renderwin.c +++ b/source/blender/src/renderwin.c @@ -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(); |