Toshihiro Shimizu 890ddd
//------------------------------------------------------------
Toshihiro Shimizu 890ddd
#include "tfxparam.h"
Toshihiro Shimizu 890ddd
#include "stdfx.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "ino_common.h"
shun-iwasawa e00258
#include "igs_color_blend.h"
shun-iwasawa 70bc26
shun-iwasawa 70bc26
//------------------------------------------------------------
shun-iwasawa 70bc26
// Regarding computation in linear color space mode is based on the "ComposeAdd"
shun-iwasawa 70bc26
// plugin fx by DWANGO Co., Ltd. The major difference from the original
shun-iwasawa 70bc26
// "ComposeAdd" is the "Source is premultiplied" option; the semi-transparent
shun-iwasawa 70bc26
// pixels are un-premultiplied before converting to linear color space. Also
shun-iwasawa 70bc26
// modified the transfer functions to use standard gamma correction.
shun-iwasawa e00258
//-------------
shun-iwasawa 70bc26
Toshihiro Shimizu 890ddd
/* tnzbase --> Source Files --> tfx --> binaryFx.cppを参照 */
Shinya Kitaoka d1f6c4
class ino_blend_add final : public TBlendForeBackRasterFx {
Shinya Kitaoka 120a6e
  FX_PLUGIN_DECLARATION(ino_blend_add)
shun-iwasawa 70bc26
Toshihiro Shimizu 890ddd
public:
shun-iwasawa e00258
  ino_blend_add() : TBlendForeBackRasterFx(true) {
shun-iwasawa e00258
    // expand the opacity range
Shinya Kitaoka 120a6e
    this->m_opacity->setValueRange(0, 10.0 * ino::param_range());
Shinya Kitaoka 120a6e
  }
Shinya Kitaoka 120a6e
  ~ino_blend_add() {}
Toshihiro Shimizu 890ddd
shun-iwasawa e00258
  void brendKernel(double& dnr, double& dng, double& dnb, double& dna,
shun-iwasawa e00258
                   const double upr, double upg, double upb, double upa,
shun-iwasawa e00258
                   const double up_opacity,
shun-iwasawa 26a3ce
                   const bool alpha_rendering_sw = true,
shun-iwasawa 26a3ce
                   const bool is_xyz             = false) override {
shun-iwasawa 26a3ce
    igs::color::add(dnr, dng, dnb, dna, upr, upg, upb, upa, up_opacity,
shun-iwasawa 26a3ce
                    !is_xyz);
Shinya Kitaoka 120a6e
  }
Toshihiro Shimizu 890ddd
};
shun-iwasawa e00258
FX_PLUGIN_IDENTIFIER(ino_blend_add, "inoAddFx");