Photon tracing fixed.
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
|
||||
class PhotonTracer: public Tracer {
|
||||
public:
|
||||
PhotonTracer(): Tracer(), m_h_radius(0.5f) { }
|
||||
PhotonTracer(unsigned int max_depth, float _r = 0.5f): Tracer(max_depth), m_h_radius(_r) { };
|
||||
PhotonTracer(): Tracer(), m_h_radius(0.5f), m_cone_filter_k(1.0f) { }
|
||||
PhotonTracer(unsigned int max_depth, float _r = 0.5f, float _k = 1.0f): Tracer(max_depth), m_h_radius(_r), m_cone_filter_k(_k < 1.0f ? 1.0f : _k) { };
|
||||
|
||||
virtual ~PhotonTracer();
|
||||
virtual vec3 trace_ray(Ray & r, Scene * s, unsigned int rec_level) const;
|
||||
@@ -18,6 +18,7 @@ public:
|
||||
void build_photon_map(const bool caustics = false);
|
||||
private:
|
||||
float m_h_radius;
|
||||
float m_cone_filter_k;
|
||||
kdTree m_photon_map;
|
||||
kdTree m_caustics_map;
|
||||
void trace_photon(Photon & ph, Scene * s, const unsigned int rec_level);
|
||||
|
||||
Reference in New Issue
Block a user