cloudy-raytracer/renderer/superrenderer.h
2022-12-13 02:47:01 +01:00

33 lines
958 B
C++

//
// Created by arvids on 13.12.22.
//
#ifndef CG1_TRACER_SUPERRENDERER_H
#define CG1_TRACER_SUPERRENDERER_H
#include "renderer.h"
#include <thread>
#include <atomic>
class SuperRenderer : public Renderer {
public:
static void
renderThread(const Scene *scene, Camera const *camera, Texture *image, int width, int widthStep,
int widthOffset, int height, int heightStep, int heightOffset, std::atomic<int> *k,
int const stepSize, int superSamplingFactor);
Texture renderImage(const Scene &scene, const Camera &camera, int width, int height) override;
void setSuperSamplingFactor(int superSamplingFactor);
private:
private:
int superSamplingFactor;
static Color &
calcSuperColor(const Scene *scene, const Camera *camera, int width, int height, int superSamplingFactor,
const float aspectRatio, int y, int x, Color &fragmentColor);
};
#endif //CG1_TRACER_SUPERRENDERER_H