About that Agartha demo

A little detour before the shadow work begins.

I finally played the Agartha demo. It’s one of those holy grail of unreleased games that I’m glad made it out into the wild in one form or another. The control scheme is pretty neat, kind of like how Shenmue can use the analogue trigger to go from a walk to a run but that’s how you move forward. I couldn’t figure out how to pick up items dropped. Visually, it’s a very impressive game for as early as it was in development. Such a shame that streaming 3D worlds weren’t there at that point in time and we still had levels/areas of the world periodically loaded in. Then again, I don’t think many Dreamcast owners would have wanted their GD drives seeking constantly.

That aside, there was something that stuck out to me, which is that the line rendering in the game didn’t cause it to slow to a standstill. I’m not 100% on if it uses Ninja or Kamui for the rendering. The windows look like Nindows but I haven’t messed around with Ninja enough to say that for certain. The Kamui rendering stats did make me think that it could be using Kamui instead. I knew that the Ninja library provided a njDrawLines3D function but thought it would be too much effort to reverse engineer what it’s doing. Not quite. It took about six hours in total to go through and figure out how it was rendering the lines without causing rendering issues. There’s still one variable which I don’t know where it comes from exactly, which controls the line’s thickness. I’ve hard-coded it to a value that looks good enough for now. The end result is a much nicer looking line rendering method at the cost of not being able to draw as many lines with the current setup due to overflow issues. It may be possible to use another render pass to get around this but I haven’t yet investigated it further.

Here are the results (software rendering on top, Kamui on the bottom):

Kamui line rendering with everything enabled. Software line rendering with everything enabled. Kamui line rendering of the wireframe. Software line rendering of the wireframe. Software line rendering of the normals. Kamui line rendering of the normals. Software line rendering of the joints. Kamui line rendering of the joints.

One thing that I also did is force the joints to always render through the depth buffer.

I also have two comparison videos for performance (software on top, Kamui on bottom):