adding material class
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
|
||||
Renderer::Renderer()
|
||||
{
|
||||
bvh.addPointLight(PointLight{
|
||||
.position = glm::vec3(2, 0, 2),
|
||||
.color = glm::vec3(0, 1, 0),
|
||||
});
|
||||
bvh.addModels(ModelLoader::loadModel("../res/models/cube.fbx"),
|
||||
glm::mat4(glm::vec4(1.0f, 0.0f, 0.0f, 0.0f), glm::vec4(0.0f, 1.0f, 0.0f, 0.0f), glm::vec4(0.0f, 0.0f, 1.0f, 0.0f),
|
||||
glm::vec4(0.0f, 0.0f, 0.0f, 1.0f)));
|
||||
|
||||
+1
-1
@@ -161,7 +161,7 @@ std::optional<IntersectionInfo> Scene::intersectModel(const ModelReference& refe
|
||||
intersection = IntersectionInfo{.position = ray.origin + ray.direction * resultVector.x,
|
||||
.normal = n,
|
||||
.albedo = glm::vec3(0.7f, 0.7f, 0.7f),
|
||||
.emissive = glm::vec3(0.0f, 0.0f, 0.0f)};
|
||||
.emissive = glm::vec3(0.0f, 0.0f, 0.0f),};
|
||||
distance = resultVector.x;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
target_sources(RayTracer
|
||||
PRIVATE
|
||||
Camera.h
|
||||
Material.h
|
||||
Material.cpp
|
||||
Model.h
|
||||
Model.cpp
|
||||
ModelLoader.h
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#include "Material.h"
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
class Material
|
||||
{
|
||||
public:
|
||||
private:
|
||||
};
|
||||
Reference in New Issue
Block a user