emartinez-dev / miniRT

This project is an introduction to the beautiful world of Raytracing. Once completed you will be able to render simple Computer-Generated-Images and you will never be afraid of implementing mathematical formulas again.
The Unlicense
2 stars 0 forks source link

BUG: drawing spheres behind the camera #20

Closed emartinez-dev closed 1 year ago

emartinez-dev commented 1 year ago

When objects are placed behind the camera, they "inverse" themselves instead of disappearing

Ball at z:10, camera at z:0 looking at positive axis:

Screen Shot 2023-07-10 at 12 24 03 PM

Ball at z:10, camera at z:0 looking at negative axis (backwards):

Screen Shot 2023-07-10 at 12 24 19 PM
emartinez-dev commented 1 year ago

Fixed in 164a426