| #pragma once |
| |
| |
| |
| |
| |
| |
| #ifndef IWA_SPECTRUM_H |
| #define IWA_SPECTRUM_H |
| |
| #include "tfxparam.h" |
| #include "stdfx.h" |
| #include "tfxparam.h" |
| |
| struct float3 { |
| float x, y, z; |
| }; |
| struct float4 { |
| float x, y, z, w; |
| }; |
| |
| class Iwa_SpectrumFx : public TStandardRasterFx |
| { |
| |
| FX_PLUGIN_DECLARATION(Iwa_SpectrumFx) |
| |
| protected: |
| TRasterFxPort m_input; |
| TRasterFxPort m_light; |
| |
| TDoubleParamP m_intensity; |
| TDoubleParamP m_refractiveIndex; |
| TDoubleParamP m_thickMax; |
| TDoubleParamP m_thickMin; |
| TDoubleParamP m_RGamma; |
| TDoubleParamP m_GGamma; |
| TDoubleParamP m_BGamma; |
| TDoubleParamP m_lensFactor; |
| TDoubleParamP m_lightThres; |
| TDoubleParamP m_lightIntensity; |
| |
| |
| void calcBubbleMap(float3 *bubbleColor, double frame); |
| |
| template <typename RASTER, typename PIXEL> |
| void convertRaster(const RASTER ras, |
| TDimensionI dim, |
| float3 *bubbleColor); |
| template <typename RASTER, typename PIXEL> |
| void convertRasterWithLight(const RASTER ras, |
| TDimensionI dim, |
| float3 *bubbleColor, |
| const RASTER lightRas, |
| float lightThres, |
| float lightIntensity); |
| |
| |
| template <typename RASTER, typename PIXEL> |
| void setSourceRasters(const RASTER ras, |
| float4 *in_out_tile_host, |
| const RASTER light_ras, |
| float4 *light_host, |
| TDimensionI dim, |
| bool useLight); |
| |
| |
| template <typename RASTER, typename PIXEL> |
| void outputRasters(const RASTER outRas, |
| float4 *in_out_tile_host, |
| TDimensionI dim); |
| |
| public: |
| Iwa_SpectrumFx(); |
| |
| void doCompute(TTile &tile, |
| double frame, |
| const TRenderSettings &settings); |
| |
| void doCompute_CUDA(TTile &tile, |
| double frame, |
| const TRenderSettings &settings); |
| |
| bool doGetBBox(double frame, |
| TRectD &bBox, |
| const TRenderSettings &info); |
| |
| bool canHandle(const TRenderSettings &info, |
| double frame); |
| }; |
| |
| #endif |