Added camera abstraction.

This commit is contained in:
Miguel Angel Astor Romero
2017-01-12 17:23:11 -04:00
parent 991d339b65
commit 724a98f8a0
12 changed files with 215 additions and 93 deletions

16
sampling.hpp Normal file
View File

@@ -0,0 +1,16 @@
#pragma once
#ifndef SAMPLING_HPP
#define SAMPLING_HPP
#include <glm/vec3.hpp>
using glm::vec3;
extern const float PDF;
extern float random01();
extern void create_coords_system(const vec3 &n, vec3 &nt, vec3 &nb);
extern vec3 sample_hemisphere(const float r1, float r2);
extern void rotate_sample(vec3 & sample, vec3 & n);
#endif