adding ambient lighting

This commit is contained in:
Dynamitos
2025-01-26 22:12:21 +01:00
parent e24bcd508c
commit c52a983faf
6 changed files with 8 additions and 10 deletions
+1 -1
View File
@@ -9,6 +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);
return (albedo * diffuse * lightColor) + glm::vec3(0.03, 0.03, 0.03);
//+(specularColor * specular);
}
+1 -1
View File
@@ -4,7 +4,7 @@
struct Camera
{
glm::vec3 position;
glm::vec3 direction;
glm::vec3 target;
glm::vec2 sensorSize = glm::vec2(0.036, 0.024);
float S_O = 6.9;
float f = 0.7;