27 lines
580 B
C++
27 lines
580 B
C++
|
|
#ifndef CG1_TRACER_BLOOMSHADER_H
|
|
#define CG1_TRACER_BLOOMSHADER_H
|
|
|
|
#include "common/texture.h"
|
|
#include "common/vector3d.h"
|
|
|
|
class Bloomshader {
|
|
|
|
public:
|
|
Bloomshader(CImg<float> image);
|
|
CImg<float> bloom(float threshold, int kernelSize, float sigma, float intensity);
|
|
|
|
private:
|
|
void scaleBrightness(float scale);
|
|
void gaussianBlur(int kernelSize, float sigma);
|
|
|
|
CImg<float> convolution(CImg<float> &img, CImg<float> &kernel);
|
|
CImg<float> computeGaussianKernel(int kernelSize, float sigma);
|
|
|
|
|
|
|
|
CImg<float> image;
|
|
};
|
|
|
|
|
|
#endif //CG1_TRACER_BLOOMSHADER_H
|