fixing shading a bit
This commit is contained in:
+2
-1
@@ -9,5 +9,6 @@ glm::vec3 BRDF::evaluate(HitInfo hit, glm::vec3 viewDir, glm::vec3 lightDir, glm
|
||||
glm::vec3 h = glm::normalize(lightDir + viewDir);
|
||||
float specular = pow(std::min(std::max(glm::dot(normal, h), 0.0f), 1.0f), shininess);
|
||||
|
||||
return (albedo * diffuse * lightColor) + (specularColor * specular);
|
||||
return (albedo * diffuse * lightColor);
|
||||
//+(specularColor * specular);
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ struct BRDF
|
||||
glm::vec3 albedo = glm::vec3(1, 1, 1);
|
||||
float alpha = 1;
|
||||
glm::vec3 specularColor = glm::vec3(1, 1, 1);
|
||||
float shininess = 0;
|
||||
float shininess = 0.04;
|
||||
glm::vec3 emissive = glm::vec3(0, 0, 0);
|
||||
MaterialType materialType;
|
||||
glm::vec3 evaluate(struct HitInfo hit, glm::vec3 viewDir, glm::vec3 lightDir, glm::vec3 lightColor);
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ struct Ray
|
||||
|
||||
struct HitInfo
|
||||
{
|
||||
float t;
|
||||
float t = std::numeric_limits<float>::max();
|
||||
glm::vec3 position;
|
||||
glm::vec3 normal;
|
||||
// not entirely sure what that does
|
||||
|
||||
Reference in New Issue
Block a user