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:
authorCampbell Barton <ideasman42@gmail.com>2014-04-16 17:25:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-16 17:25:10 +0400
commitd1b1d194dc9cc741d87dc63e701402de0776c694 (patch)
tree344bde4783c61c65412fa1fd2435e705ead26965 /source/blender/compositor/operations/COM_MaskOperation.cpp
parentb3972aeea05bc6c60d7b7da4e6b59a64b822448a (diff)
Fix for half pixel offset rasterizing masks
Diffstat (limited to 'source/blender/compositor/operations/COM_MaskOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp
index 112b5912ad3..8c8ba93327d 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_MaskOperation.cpp
@@ -129,8 +129,9 @@ void MaskOperation::determineResolution(unsigned int resolution[2], unsigned int
void MaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
{
- const float xy[2] = {x * this->m_maskWidthInv,
- y * this->m_maskHeightInv};
+ const float xy[2] = {
+ (x * this->m_maskWidthInv) + this->m_mask_px_ofs[0],
+ (y * this->m_maskHeightInv) + this->m_mask_px_ofs[1]};
if (this->m_rasterMaskHandleTot == 1) {
if (this->m_rasterMaskHandles[0]) {