|
Post by stevenschronk on Sept 30, 2021 2:04:56 GMT
My raytracer seems to be rendering everything twice. I looks like the geometry is showing up and the colors are correct based on it's input. All of my tests completely pass. I keep thinking something is wrong with my ray_for_pixel() method but I have gone over it and cannot find any error. Thanks for any help you can provide. Attachments:
RayTracerTest.c (115.9 KB)
|
|
|
Post by Jamis on Oct 4, 2021 15:34:23 GMT
stevenschronk -- I'm afraid I don't have any solutions for you, BUT it does look to me (looking carefully at your output) as if the image were rendering not doubled, but simply with scanlines split between halves of the image. That is to say, for an image with scanlines like so: A B C D E F Your image is rendering them like: A B C D E F (That's my hypothesis, anyway.) You can see this, sort of, when looking closely at the yellow sphere. Like I said, though, I don't know why it's happening, but maybe that will give you something more to investigate? My advice at this point would be to set a breakpoint of some sort at x=HORIZONTAL_SIZE/2 and see what your program is doing there. (Or, printf your way through it, which is how I tend to approach these things!)
|
|