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:
authorLukas Tönne <lukas.toenne@gmail.com>2015-02-17 17:24:23 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-02-17 17:24:23 +0300
commitd0da158ad54b04213237091183e94d403199f34e (patch)
treeb2bab1aacb53dfdb7c1ff7b6741b1ef217f6b9d8 /source/blender/gpu/intern/gpu_compositing.c
parent64e3661434f11b4201c08cac1e99f08853551c86 (diff)
parentea2fc5b9d6000a61dba5e8c37a36231a2f22e6d4 (diff)
Merge branch 'master' into gooseberry
Conflicts: intern/cycles/blender/blender_mesh.cpp source/blender/editors/space_view3d/view3d_draw.c
Diffstat (limited to 'source/blender/gpu/intern/gpu_compositing.c')
-rw-r--r--source/blender/gpu/intern/gpu_compositing.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_compositing.c b/source/blender/gpu/intern/gpu_compositing.c
index f2044f21c9b..e379f52bde3 100644
--- a/source/blender/gpu/intern/gpu_compositing.c
+++ b/source/blender/gpu/intern/gpu_compositing.c
@@ -256,7 +256,7 @@ bool GPU_fx_compositor_initialize_passes(
GPUFX *fx, const rcti *rect, const rcti *scissor_rect,
const GPUFXSettings *fx_settings)
{
- int w = BLI_rcti_size_x(rect) + 1, h = BLI_rcti_size_y(rect) + 1;
+ int w = BLI_rcti_size_x(rect), h = BLI_rcti_size_y(rect);
char err_out[256];
int num_passes = 0;
char fx_flag = fx_settings->fx_flag;
@@ -281,6 +281,12 @@ bool GPU_fx_compositor_initialize_passes(
return false;
}
+ /* scissor is missing when drawing offscreen, in that case, dimensions match exactly. In opposite case
+ * add one to match viewport dimensions */
+ if (!scissor_rect) {
+ w++, h++;
+ }
+
fx->num_passes = 0;
/* dof really needs a ping-pong buffer to work */
if (fx_flag & GPU_FX_FLAG_DOF)