Yeah, I accidentally referred to it as a raycaster. It's definitely a raytracer, albeit a bit limited. I *have* made raycasters, though! (I at least know about the fisheye effect.)
One little correction: If it casts a ray for every pixel, it's a raytracer, not a raycaster. Raycasters cast rays for every vertical line and are therefore a little more limited (but a lot faster, too). But still, you seem to have some great code up there. GJ.
This is a common misconception. A raycaster is a subset of a raytracer which only has one level or ray intersections check (that is the ray from the camera to the world). A raytracer sends more than one rays to the world (for shadows, reflections, etc). That is the major difference between a raycaster and a raytracer.
The vertical line thing has nothing to do with raycasting, it is only a 2D implementation of it.
The thing about surfaces turning into one color when you move down on them seems perfectly reasonable to me. You could give the cam a small bounding box to prevent that from happening.
Also, please add reflecting spheres and glass cubes. :)
Yeah, I accidentally referred to it as a raycaster. It's definitely a raytracer, albeit a bit limited. I *have* made raycasters, though! (I at least know about the fisheye effect.)
iamgreaser 2 years ago
One little correction: If it casts a ray for every pixel, it's a raytracer, not a raycaster. Raycasters cast rays for every vertical line and are therefore a little more limited (but a lot faster, too). But still, you seem to have some great code up there. GJ.
Kodandis 3 years ago
This is a common misconception. A raycaster is a subset of a raytracer which only has one level or ray intersections check (that is the ray from the camera to the world). A raytracer sends more than one rays to the world (for shadows, reflections, etc). That is the major difference between a raycaster and a raytracer.
The vertical line thing has nothing to do with raycasting, it is only a 2D implementation of it.
badsectoracula 2 years ago
Great!
The thing about surfaces turning into one color when you move down on them seems perfectly reasonable to me. You could give the cam a small bounding box to prevent that from happening.
Also, please add reflecting spheres and glass cubes. :)
RedNifre 3 years ago