The ISA is as if Zilog forgot all they've learnt in 40 years, it's pathetic. Despite being an extension to the z80, all techniques you may know on the z80 don't apply in ez80 mode, because register pairs are made of three bytes, the top of which isn't accessible directly! Almost no useful instructions were added other than an 8*8 multiplication instruction and maybe something else. The TI-84+CE was introduced in 2015 and features an ez80 core running at 48MHz. ![]() I recommend everybody try it out and see the amazing demos available online that use it. Raymarching is much more involved than this and is certainly a fun rabbit hole to go down. This site only offers WebM videos because it is limited in size. Here's a simple scene with a plane and a sphere being softly merged, along with the sin function being applied on the plane. Other operations can be performed on SDFs without much fuss. To render the intersection, you take their maximum. To render multiple shapes, you take the minimum of their signed distance fields. Suddenly, many things become simple and elegant. In both cases, the magnitude is the distance to the nearest point on the surface of the shape. If the signed distance is negative, then the point is inside the shape, and we have detected a collision. If the signed distance is positive, the point lies outside the shape and is "marched" that specific distance forward. ![]() It then computes the signed distance from the point to the shape. Ray marching instead uses that ray and picks a point on it. While the idea is simple, raytracing can have extremely complicated formulae for computing these intersections, and become non-trivial for complex and dynamically-changing shapes. Ray tracing is when you take a form and compute the intersection of a ray with it. ![]() For those who do not know raymarching, here's a recap. This time, though, I went for not a generic raymarcher, but one that specifically marches through a 3D voxel space. One of my favorite things to do when I learn to program for a particular system is to write a raymarcher.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |