Closed ElisaLegnani closed 3 years ago
Here some tests with diffusive sphere (0.5, 0.5, 0.5) and emittive background (0, 0, 1) and ground (1, 0, 0), with antialiasing applied (number of samples per pixel = 4), to better see the effect.
There must be an approximation problem when calculating the ray intersection with the sphere close to the equatorial line.
The issue appears only when scaling the sphere along the x direction! Note: the previuos images where obtained by scaling the sphere along all directions.
scaling along x (0.6)
scaling along y (0.6)
scaling along z (0.6)
no scaling
It has nothing to do neither with scaling nor with spheres! Normals of the world's light rays - shapes intersections are not normalized, and they need to be for diffusive BRDF ray scattering.
Bug fixed!
scaling along x (0.6)
A control on normalization of vectors/normals for ONB creation could be useful!
That is a great idea! So anyone who wants to enhance or play with the code is advised if the ONB creation doesn't work as it should.
This PR is meant to fix issue #25.