Skip to content
Snippets Groups Projects
Commit 921f274f authored by Yoel's avatar Yoel
Browse files

DiffuseMaterial refactored as it needs the Random-functions

parent ab2182d5
No related branches found
No related tags found
No related merge requests found
#include "DiffuseMaterial.h"
#include "../tools/Random.h"
#include "texture/Constant.h"
namespace material {
......@@ -27,7 +28,7 @@ util::Vec3 DiffuseMaterial::emission(float texel_x, float texel_y) const {
}
util::Vec3 DiffuseMaterial::scattered_d(const util::Vec3& d,
const util::Vec3& n) const {
return n + rand_vec3_in_circle(1);
return n + util::rand_vec3_in_circle(1);
}
bool DiffuseMaterial::scatter() const {
return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment