14 votes

SuperRT - Realtime raytracing on the SNES (walkthrough and technical overview)

6 comments

  1. Icarus
    Link
    Blog post for those who prefer to read about this technical feat.

    Blog post for those who prefer to read about this technical feat.

    3 votes
  2. [2]
    Akir
    Link
    Personally, I am much more interested that they built a raytracing accellerator than the fact that it's running on an SNES.

    Personally, I am much more interested that they built a raytracing accellerator than the fact that it's running on an SNES.

    2 votes
    1. teaearlgraycold
      Link Parent
      This is the assembly: 0000 Start 0001 Plane 0, -1, 0, Dist=-2 0002 SphereSub OH 2, 1, 5, Rad=5 0003 SphereSub OH 4, 1, 4, Rad=4 0004 SphereSub OH 5, 1, 9, Rad=9 0005 SphereSub OH 2, 1, 2, Rad=2...

      This is the assembly:

      0000 Start
      0001 Plane 0, -1, 0, Dist=-2
      0002 SphereSub OH 2, 1, 5, Rad=5
      0003 SphereSub OH 4, 1, 4, Rad=4
      0004 SphereSub OH 5, 1, 9, Rad=9
      0005 SphereSub OH 2, 1, 2, Rad=2
      0006 SphereSub OH -0.5, 1, 2, Rad=2
      0007 RegisterHitNoReset 0, 248, 0, Reflectiveness=0
      0008 Checkerboard ORH 48, 152, 48, Reflectiveness=0
      0009 ResetHitState
      0010 Plane 0, -1, 0, Dist=-2.150146
      0011 RegisterHit 0, 0, 248, Reflectiveness=153
      0012 AABB 4, -2.5, 11,    8, 3.5, 13
      0013 ResetHitStateAndJump NH 44
      0014 Origin 6, 2, 12
      0015 Plane -0.2929688, 0, -0.9570313, Dist=0.2497559
      0016 PlaneAnd OH 0.2919922, 0, 0.9560547, Dist=0.25
      0017 PlaneAnd OH 0, 1, 0, Dist=1
      0018 PlaneAnd OH 0, -1, 0, Dist=4
      0019 PlaneAnd OH -0.9570313, 0, 0.2919922, Dist=-1
      0020 PlaneAnd OH 0.9560547, 0, -0.2929688, Dist=1.499756
      0021 RegisterHit 248, 0, 0, Reflectiveness=0
      

      Very interesting

      1 vote
  3. nothis
    Link
    This is kinda exciting but a few details to ground it a bit: The SNES had a CPU of 3.58 MHz. This uses a custom chip that, like the Super FX chip, would have been built into the cartridge as an...

    This is kinda exciting but a few details to ground it a bit: The SNES had a CPU of 3.58 MHz. This uses a custom chip that, like the Super FX chip, would have been built into the cartridge as an expansion and it apparently consists of three parallel cores running at 50 Mhz each, doing the raytracing math. The Super FX chip apparently had 21 Mhz (with the first edition running at half that speed, though).

    The author on feasibility back in the day (youtube comment):

    I haven't looked into it deeply, but my gut feeling is that it would have been technically feasible, but probably too expensive to actually use in a shipping game.

    So, does this really run "on" a SNES? No-ish. But you could produce a cartridge that actually works on a normal SNES which is amazing enough.

    2 votes
  4. Ephemere
    Link
    That was fascinating, I'm deeply impressed. The thought that that's something someone knocks off in their spare time is incredible.

    That was fascinating, I'm deeply impressed. The thought that that's something someone knocks off in their spare time is incredible.

    1 vote
  5. DataWraith
    Link
    Slightly off-topic, but if you enjoyed this, you might also like Reverse emulating the NES to give it SUPER POWERS!, where custom hardware is added to a NES cartridge to make it capable of...

    Slightly off-topic, but if you enjoyed this, you might also like Reverse emulating the NES to give it SUPER POWERS!, where custom hardware is added to a NES cartridge to make it capable of emulating SNES games.
    The entire channel is fantastic, really. The videos tend to start a bit slow, but they're definitively worth watching.

    1 vote