• Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

raytracer part 6

Sign in to follow this  


At 00.00 I had checkered pigments, but they suck! There are huge and ugly artifacts. It's 04.05 now so I'm giving up... If there's ANYONE that knows of a better algo and how to implement it, please please tell me!

The code I'm using is (in pseudocode):

v = intersectionPoint(ray,object) / scalar
flooredSum = (floor(v.x) + floor(v.y) + floor(v.z))
if( flooredSum % 2 )
return color1
return color2

And to prove it's ugliness:

EDIT: found two bugs. I wasn't using the ambient light factor in the material correctly and I was using my own shiness coefficient instead of the teachers. That's fixed and the pic above has been replaced with a newly rendered one.
Sign in to follow this  

1 Comment

Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement