Started sketching the photon mapping.

This commit is contained in:
2017-02-21 17:00:49 -04:00
parent 4e9a30d0b5
commit 2efb8b33d4
5 changed files with 226 additions and 5 deletions

21
photon_tracer.hpp Normal file
View File

@@ -0,0 +1,21 @@
#pragma once
#ifndef PHOTON_TRACER_HPP
#define PHOTON_TRACER_HPP
#include "tracer.hpp"
#include "kd_tree.hpp"
class PhotonTracer: public Tracer {
public:
PhotonTracer(): Tracer() { }
PhotonTracer(unsigned int max_depth): Tracer(max_depth) { };
virtual ~PhotonTracer();
virtual vec3 trace_ray(Ray & r, Scene * s, unsigned int rec_level) const;
void build_photon_map(kdTree & photon_map, Scene * s, const unsigned int rec_level, const size_t n_photons_per_ligth = 10000, const bool specular = false) const;
};
#endif