Merge branch 'master' into multithread_renderer

This commit is contained in:
arvid schröder 2022-11-30 18:14:30 +01:00
commit 8c0f4db798

View file

@ -1,3 +1,4 @@
#include <array>
#include "light/light.h"
#include "scene/scene.h"
#include "shader/brdfshader.h"
@ -21,15 +22,14 @@ Color BrdfShader::shade(Scene const &scene, Ray const &ray) const {
return Vector3d{
((axis_y.y * axis_z.z - axis_y.z * axis_z.y) * vec.x +
(axis_y.z * axis_z.x - axis_y.x * axis_z.z) * vec.y +
(axis_y.x * axis_z.y - axis_y.y * axis_z.x) * vec.z) / det,
(axis_y.x * axis_z.y - axis_z.x * axis_y.y) * vec.z) / det,
((axis_x.z * axis_z.y - axis_x.y * axis_z.z) * vec.x +
(axis_x.x * axis_z.z - axis_x.x * axis_y.z) * vec.y +
(axis_x.y * axis_z.x - axis_x.x * axis_y.x) * vec.z) / det,
(axis_x.x * axis_z.z - axis_x.z * axis_z.x) * vec.y +
(axis_z.x * axis_x.y - axis_x.x * axis_z.y) * vec.z) / det,
((axis_x.y * axis_y.z - axis_x.z * axis_y.y) * vec.x +
(axis_x.z * axis_y.x - axis_x.x * axis_y.z) * vec.y +
(axis_x.x * axis_y.y - axis_x.y * axis_y.x) * vec.z) / det
(axis_y.x * axis_x.z - axis_x.x * axis_y.z) * vec.y +
(axis_x.x * axis_y.y - axis_y.x * axis_x.y) * vec.z) / det
};
};
for (auto &light: scene.lights()) {