Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-08-12 15:27:00 +0400
committerTon Roosendaal <ton@blender.org>2006-08-12 15:27:00 +0400
commite47137ff42ac241fe6c68d4df3466b030315edee (patch)
treec19568b96be11e36d0e548e5bcae92fa9f37be83 /source/blender/src/editview.c
parent3be0a5ad708312552ad3abd65184670df8f2f22d (diff)
Bugreport #4787 mentioned subpixel render issues, especially for small
images (like used for rendering icons). When working during Orange on new render pipeline, I've left this topic alone for a while... subpixel precision testing is very time consuming and needs concentration for a while. :) This commit brings back precision as it was for 2.41. Below a short explanation of the solved issues. - the window matrix for rendering is kept constant during all OSA passes, this to ensure clipping happens for each pass identically. - a subpixel offset is only applied on filling in the z-buffer - this offset is inverse corrected for shadepixel code, only on 2 places Another nasty issue is that for filtered rendering (gauss etc), the tiles (or entire image) is temporally increased 2 pixel in size. This caused a 'dark' (or sky color) edge on the rendering. During Orange that was solved with a hardcoded clipping offset value, which only corrected for larger pictures (like > 500 pixels in size). Now this clipping offset is correctly calculated, based on render size. Last issue: the view border in 3d window was calculated using integers, giving small errors in display too. Now it uses float, so visually the view border is more close to what a render shows.
Diffstat (limited to 'source/blender/src/editview.c')
-rw-r--r--source/blender/src/editview.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c
index 76d857826b6..001105c43a9 100644
--- a/source/blender/src/editview.c
+++ b/source/blender/src/editview.c
@@ -1980,14 +1980,14 @@ void set_render_border(void)
val= get_border(&rect, 3);
if(val) {
- rcti vb;
+ rctf vb;
calc_viewborder(G.vd, &vb);
- G.scene->r.border.xmin= (float) (rect.xmin-vb.xmin)/(vb.xmax-vb.xmin);
- G.scene->r.border.ymin= (float) (rect.ymin-vb.ymin)/(vb.ymax-vb.ymin);
- G.scene->r.border.xmax= (float) (rect.xmax-vb.xmin)/(vb.xmax-vb.xmin);
- G.scene->r.border.ymax= (float) (rect.ymax-vb.ymin)/(vb.ymax-vb.ymin);
+ G.scene->r.border.xmin= ((float)rect.xmin-vb.xmin)/(vb.xmax-vb.xmin);
+ G.scene->r.border.ymin= ((float)rect.ymin-vb.ymin)/(vb.ymax-vb.ymin);
+ G.scene->r.border.xmax= ((float)rect.xmax-vb.xmin)/(vb.xmax-vb.xmin);
+ G.scene->r.border.ymax= ((float)rect.ymax-vb.ymin)/(vb.ymax-vb.ymin);
CLAMP(G.scene->r.border.xmin, 0.0, 1.0);
CLAMP(G.scene->r.border.ymin, 0.0, 1.0);