tahoma2d/toonz/sources/stdfx/iwa_adjustexposurefx.h

49 lines
1.5 KiB
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
/*------------------------------------------------
Iwa_AdjustExposureFx
調
------------------------------------------------*/
#ifndef ADJUST_EXPOSURE_H
#define ADJUST_EXPOSURE_H
#include "stdfx.h"
#include "tfxparam.h"
struct float4 {
2016-06-15 18:43:10 +12:00
float x, y, z, w;
2016-03-19 06:57:51 +13:00
};
class Iwa_AdjustExposureFx final : public TStandardRasterFx {
2016-06-15 18:43:10 +12:00
FX_PLUGIN_DECLARATION(Iwa_AdjustExposureFx)
2016-03-19 06:57:51 +13:00
protected:
2016-06-15 18:43:10 +12:00
TRasterFxPort m_source;
TDoubleParamP m_hardness; /*- フィルムのガンマ値 -*/
TDoubleParamP m_scale; /*- 明るさのスケール値 -*/
TDoubleParamP m_offset; /*- 明るさのオフセット値 -*/
/*- タイルの画像を0〜1に正規化してホストメモリに読み込む -*/
template <typename RASTER, typename PIXEL>
void setSourceRaster(const RASTER srcRas, float4 *dstMem, TDimensionI dim);
/*- 出力結果をChannel値に変換して格納 -*/
template <typename RASTER, typename PIXEL>
void setOutputRaster(float4 *srcMem, const RASTER dstRas, TDimensionI dim);
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
Iwa_AdjustExposureFx();
2016-03-19 06:57:51 +13:00
2016-06-20 14:23:05 +12:00
void doCompute(TTile &tile, double frame,
const TRenderSettings &settings) override;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void doCompute_CPU(TTile &tile, double frame, const TRenderSettings &settings,
TDimensionI &dim, float4 *tile_host);
2016-03-19 06:57:51 +13:00
2016-06-20 14:23:05 +12:00
bool doGetBBox(double frame, TRectD &bBox,
const TRenderSettings &info) override;
2016-03-19 06:57:51 +13:00
2016-06-19 20:06:29 +12:00
bool canHandle(const TRenderSettings &info, double frame) override;
2016-03-19 06:57:51 +13:00
};
#endif