diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-05-08 14:15:51 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-05-08 14:15:51 +0400 |
commit | 15e79ef4c834ea31b14ef72d522fb0a5d00dc76e (patch) | |
tree | f1718381a9b83a7cb3edbb19657d74e162344862 /source/blender/src/view.c | |
parent | ad30c0b48b2d8f1adc32bcccc3f27ef1ef76a42d (diff) |
SSS fixes:
- Radius R, G, B sliders had too small number increase on clicking.
- Preview render now renders with higher SSS error setting to speed it up a
bit.
- bug #6664: 3d preview render had artifacts. re->viewdx/dy wasn't set then,
which is needed to estimate the area of each point. Have set this now, not
in the nicest way, there is some bit duplicated code, but I don't want to
refactor existing code with the chance of breaking it at this point.
- bug #6665: grid like artifacts with parts rendering. The two extra pixels
around parts used for filtering were used as well, leading to double points.
Diffstat (limited to 'source/blender/src/view.c')
-rw-r--r-- | source/blender/src/view.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/src/view.c b/source/blender/src/view.c index d5cfef5d590..c501dbb8f73 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -825,7 +825,7 @@ void object_view_settings(Object *ob, float *lens, float *clipsta, float *clipen } -int get_view3d_viewplane(int winxi, int winyi, rctf *viewplane, float *clipsta, float *clipend) +int get_view3d_viewplane(int winxi, int winyi, rctf *viewplane, float *clipsta, float *clipend, float *pixsize) { Camera *cam=NULL; float lens, fac, x1, y1, x2, y2; @@ -922,6 +922,19 @@ int get_view3d_viewplane(int winxi, int winyi, rctf *viewplane, float *clipsta, y2+= dy; } } + + if(pixsize) { + float viewfac; + + if(orth) { + viewfac= (winx >= winy)? winx: winy; + *pixsize= 1.0f/viewfac; + } + else { + viewfac= (((winx >= winy)? winx: winy)*lens)/32.0; + *pixsize= *clipsta/viewfac; + } + } viewplane->xmin= x1; viewplane->ymin= y1; @@ -938,7 +951,7 @@ void setwinmatrixview3d(int winx, int winy, rctf *rect) /* rect: for picking */ float clipsta, clipend, x1, y1, x2, y2; int orth; - orth= get_view3d_viewplane(winx, winy, &viewplane, &clipsta, &clipend); + orth= get_view3d_viewplane(winx, winy, &viewplane, &clipsta, &clipend, NULL); // printf("%d %d %f %f %f %f %f %f\n", winx, winy, viewplane.xmin, viewplane.ymin, viewplane.xmax, viewplane.ymax, clipsta, clipend); x1= viewplane.xmin; y1= viewplane.ymin; |