~ubuntu-branches/ubuntu/trusty/blender/trusty-proposed

« back to all changes in this revision

Viewing changes to source/blender/compositor/operations/COM_MixSaturationOperation.cpp

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
{
36
36
        float inputColor1[4];
37
37
        float inputColor2[4];
38
 
        float value;
39
 
 
40
 
        this->m_inputValueOperation->read(&value, x, y, sampler);
41
 
        this->m_inputColor1Operation->read(&inputColor1[0], x, y, sampler);
42
 
        this->m_inputColor2Operation->read(&inputColor2[0], x, y, sampler);
43
 
 
 
38
        float inputValue[4];
 
39
 
 
40
        this->m_inputValueOperation->read(inputValue, x, y, sampler);
 
41
        this->m_inputColor1Operation->read(inputColor1, x, y, sampler);
 
42
        this->m_inputColor2Operation->read(inputColor2, x, y, sampler);
 
43
 
 
44
        float value = inputValue[0];
44
45
        if (this->useValueAlphaMultiply()) {
45
46
                value *= inputColor2[3];
46
47
        }
53
54
                rgb_to_hsv(inputColor2[0], inputColor2[1], inputColor2[2], &colH, &colS, &colV);
54
55
                hsv_to_rgb(rH, (valuem * rS + value * colS), rV, &output[0], &output[1], &output[2]);
55
56
        }
 
57
        else {
 
58
                copy_v3_v3(output, inputColor1);
 
59
        }
 
60
 
56
61
        output[3] = inputColor1[3];
57
62
 
58
63
        clampIfNeeded(output);