Started scene reader. Added libjson-spirit dependency.

This commit is contained in:
Miguel Angel Astor Romero
2017-01-18 17:26:09 -04:00
parent 965b04ca39
commit 5edccd4d30
10 changed files with 351 additions and 32 deletions

View File

@@ -2,13 +2,16 @@
#ifndef SAMPLING_HPP
#define SAMPLING_HPP
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
using glm::vec2;
using glm::vec3;
extern const float PDF;
extern float random01();
extern vec2 sample_pixel(int i, int j, float w, float h, float a_ratio, float fov);
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);