diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_MapValueOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_MapValueOperation.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.cpp b/source/blender/compositor/operations/COM_MapValueOperation.cpp index d99a68a5e00..45104d11210 100644 --- a/source/blender/compositor/operations/COM_MapValueOperation.cpp +++ b/source/blender/compositor/operations/COM_MapValueOperation.cpp @@ -39,12 +39,16 @@ void MapValueOperation::executePixelSampled(float output[4], this->m_inputOperation->readSampled(src, x, y, sampler); TexMapping *texmap = this->m_settings; float value = (src[0] + texmap->loc[0]) * texmap->size[0]; - if (texmap->flag & TEXMAP_CLIP_MIN) - if (value < texmap->min[0]) + if (texmap->flag & TEXMAP_CLIP_MIN) { + if (value < texmap->min[0]) { value = texmap->min[0]; - if (texmap->flag & TEXMAP_CLIP_MAX) - if (value > texmap->max[0]) + } + } + if (texmap->flag & TEXMAP_CLIP_MAX) { + if (value > texmap->max[0]) { value = texmap->max[0]; + } + } output[0] = value; } |