diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-16 17:25:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-16 17:25:10 +0400 |
commit | d1b1d194dc9cc741d87dc63e701402de0776c694 (patch) | |
tree | 344bde4783c61c65412fa1fd2435e705ead26965 /source/blender/compositor/operations/COM_MaskOperation.h | |
parent | b3972aeea05bc6c60d7b7da4e6b59a64b822448a (diff) |
Fix for half pixel offset rasterizing masks
Diffstat (limited to 'source/blender/compositor/operations/COM_MaskOperation.h')
-rw-r--r-- | source/blender/compositor/operations/COM_MaskOperation.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_MaskOperation.h b/source/blender/compositor/operations/COM_MaskOperation.h index 18d7e594104..522b873e167 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.h +++ b/source/blender/compositor/operations/COM_MaskOperation.h @@ -43,6 +43,7 @@ protected: int m_maskHeight; float m_maskWidthInv; /* 1 / m_maskWidth */ float m_maskHeightInv; /* 1 / m_maskHeight */ + float m_mask_px_ofs[2]; float m_frame_shutter; int m_frame_number; @@ -70,11 +71,13 @@ public: { this->m_maskWidth = width; this->m_maskWidthInv = 1.0f / (float)width; + this->m_mask_px_ofs[0] = this->m_maskWidthInv * 0.5f; } void setMaskHeight(int height) { this->m_maskHeight = height; this->m_maskHeightInv = 1.0f / (float)height; + this->m_mask_px_ofs[1] = this->m_maskHeightInv * 0.5f; } void setFramenumber(int frame_number) { this->m_frame_number = frame_number; } void setSmooth(bool smooth) { this->m_do_smooth = smooth; } |