Skip to content
Snippets Groups Projects
DiffuseMaterial.h 773 B
Newer Older
Postea's avatar
Postea committed
#pragma once
Postea's avatar
Postea committed
#include "Material.h"
Postea's avatar
Postea committed
namespace material {
class DiffuseMaterial : public Material {
Yoel's avatar
Yoel committed
   public:
	DiffuseMaterial(const std::shared_ptr<util::Sampler>& albedo_texture,
	                const std::shared_ptr<util::Sampler>& emission_texture);
	DiffuseMaterial(const std::shared_ptr<util::Sampler>& albedo);
	DiffuseMaterial(const util::Vec3& color);
	util::Vec3 albedo(float texel_x, float texel_y) const override;
	util::Vec3 emission(float texel_x, float texel_y) const override;
	util::Vec3 scattered_d(const util::Vec3& d,
	                       const util::Vec3& n) const override;
	bool scatter() const override;
Postea's avatar
Postea committed

Yoel's avatar
Yoel committed
   private:
	std::shared_ptr<util::Sampler> emission_texture;
	std::shared_ptr<util::Sampler> albedo_texture;
Yoel's avatar
Yoel committed
}  // namespace material