50 void apply(std::map<std::string, std::vector<float>> &pixel_data,
helios::int2 resolution);
59 std::vector<std::tuple<int, int, float>>
findBrightPixels(
const std::map<std::string, std::vector<float>> &pixel_data,
helios::int2 resolution,
float threshold)
const;
67 void generateStarburstKernel();
74 void generateApertureMask(std::vector<float> &mask)
const;
82 void applyStarburst(std::map<std::string, std::vector<float>> &pixel_data,
helios::int2 resolution,
const std::vector<std::tuple<int, int, float>> &bright_pixels);
91 void applyGhosts(std::map<std::string, std::vector<float>> &pixel_data,
helios::int2 resolution,
const std::vector<std::tuple<int, int, float>> &bright_pixels);
101 static float fresnelReflectance(
float cos_theta,
float n1 = 1.0f,
float n2 = 1.5f);
110 static void fft2D(
const std::vector<float> &input, std::vector<std::complex<float>> &output,
int size);
118 static void fft1D(std::vector<std::complex<float>> &data,
int size,
bool inverse =
false);
129 void renderSoftDisc(std::vector<float> &channel,
helios::int2 resolution,
float center_x,
float center_y,
float radius,
float intensity)
const;
138 std::vector<float> starburst_kernel_;
141 int kernel_size_ = 128;
144 static constexpr float ghost_scales_[] = {0.3f, 0.5f, 0.8f, 1.2f, 1.6f};
147 static constexpr float ghost_sizes_[] = {0.02f, 0.03f, 0.015f, 0.025f, 0.04f};