2#include "raycaster/Raycaster.hpp"
3#include "scene/Scene.hpp"
18 explicit PathTracer(
const std::shared_ptr<Scene> & scene);
46 static glm::vec2
getSamplePosition(
size_t sid,
const glm::ivec2 & cellCount,
const glm::vec2 & cellSize);
63 bool checkVisibility(
const glm::vec3 & startPos,
const glm::vec3 & rayDir,
float maxDist)
const;
72 glm::vec3
evalBackground(
const glm::vec3 & rayDir,
const glm::vec3 & rayPos,
const glm::vec2 & ndcPos,
bool directHit)
const;
This class represents a camera as used in real-time rendering APIs. It provides a view and projection...
Definition: Camera.hpp:11
Represents an image composed of pixels with values in [0,1]. Provide image loading/saving utilities,...
Definition: Image.hpp:8
Represent a 3D textured object.
Definition: Object.hpp:16
Unidirectional path tracer. Generates renderings of a scene by emitting rays from the user viewpoint ...
Definition: PathTracer.hpp:10
static glm::ivec2 getSampleGrid(size_t samples)
Definition: PathTracer.cpp:57
void render(const Camera &camera, size_t samples, size_t depth, Image &render)
Definition: PathTracer.cpp:159
glm::vec3 evalBackground(const glm::vec3 &rayDir, const glm::vec3 &rayPos, const glm::vec2 &ndcPos, bool directHit) const
Definition: PathTracer.cpp:23
const Raycaster & raycaster() const
Definition: PathTracer.hpp:29
static glm::mat3 buildLocalFrame(const Object &obj, const Raycaster::Hit &hit, const glm::vec3 &rayDir, const glm::vec2 &uv)
Definition: PathTracer.cpp:86
Raycaster _raycaster
The internal raycaster.
Definition: PathTracer.hpp:74
std::shared_ptr< Scene > _scene
The scene.
Definition: PathTracer.hpp:75
bool checkVisibility(const glm::vec3 &startPos, const glm::vec3 &rayDir, float maxDist) const
Definition: PathTracer.cpp:124
static glm::vec2 getSamplePosition(size_t sid, const glm::ivec2 &cellCount, const glm::vec2 &cellSize)
Definition: PathTracer.cpp:71
Allows to cast rays against a polygonal mesh, on the CPU. Relies on an internal acceleration structur...
Definition: Raycaster.hpp:10
Definition: Raycaster.hpp:16