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: cylinders faces get shadowed even though they are not in sight #27

Closed emartinez-dev closed 11 months ago

emartinez-dev commented 11 months ago

I think there is a problem with the is_at_back function, because it's shadowing the inside of the cylinders, but they should have the face colors. I know there is something with is_at_back because when I modified the function to always return 0, it worked as intended.

Picture with actual is_at_back function:

Screen Shot 2023-09-07 at 10 13 52 AM

Picture with the is_at_back function bypassed:

Screen Shot 2023-09-07 at 10 12 32 AM
emartinez-dev commented 11 months ago

Fixed in 698ec421d52862f4754dc2418cea1d4272b09e3d