Menu

Possible bug in getColorAt()

2014-12-07
2014-12-07
  • Jose Manuel Monsalve Diaz

    Hi caleb,

    First, thanks for this code, I've been using it for a project, since it is well documented with the videos and it actually helped me to understand Ray Tracing.

    I think there is a little bug in the getColorAt function, but I would like to discuss it with your first.

    In line 216 you are normalizing the vector, and then you are getting the distance to the light by using the magnitude of the vector, which will always be 1. I think the .normalize() should be removed.

    I will let you know if I find any other details. Please let me know if I can help you somehow!

    Thanks!

    Jose Monsalve

     
  • Jose Manuel Monsalve Diaz

    I found another thing, in line 234, the break command, I thing you were trying to add that break inside the if statement. line 231.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.