Files
PhotonMF/sampling.hpp

21 lines
532 B
C++
Raw Permalink Normal View History

2017-01-12 17:23:11 -04:00
#pragma once
#ifndef SAMPLING_HPP
#define SAMPLING_HPP
#include <glm/vec2.hpp>
2017-01-12 17:23:11 -04:00
#include <glm/vec3.hpp>
using glm::vec2;
2017-01-12 17:23:11 -04:00
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);
2017-01-12 17:23:11 -04:00
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, const vec3 & n);
2017-03-15 10:40:34 -04:00
extern vec3 sample_sphere(const vec3 center, const float radius);
2017-01-12 17:23:11 -04:00
#endif