Sega Saturn Emulator YabaSanshiro Takes A "Major Step Forward" 1

The Sega Saturn emulator Yaba Sanshiro has taken a big leap forward thanks to a new rendering technique that allows it to overcome one of the console's biggest quirks.

As you may (or may not) be aware, the Saturn's VDP1 chip draws sprites and polygons as quads, but modern-day GPUs are designed around drawing triangles.

"When you render a quad on a modern GPU, it is normally split into two triangles," explains Yaba Sanshiro developer devMiyax. "If you draw a sprite this way, a texture that should look natural across the whole quad can appear distorted across the seam between the two triangles."

Up until now, emulators like Yaba Sanshiro have dealt with this by tessellating the quad into smaller pieces. "This is not a fundamental fix, though," says devMiyax. "As long as the quad is approximated with triangles, you are not actually reproducing VDP1's quad rasterization itself."

Sega Saturn Emulator YabaSanshiro Takes A "Major Step Forward" 1
The image on the right is taken from the new version, and you can see the issues with distorted textures are fixed — Image: devMiyax

This can lead to graphical issues – especially if you're upping the resolution when running games under emulation. However, devMiyax's solution is a new approach to rendering based around using compute shaders.

"The new path runs a compute shader for each VDP1 command," says the developer. "In the current screen-side reverse-mapping approach, each thread is responsible for a screen pixel — or, when upscaled, an output HD pixel. In places where tessellation was too coarse, textures used to come out distorted. With this method, smooth rendering is achieved through simple per-pixel logic."

What's really exciting is that this new approach doesn't appear to come with a performance hit. "Even with this much extra work, the implementation stays at 60fps," explains devMiyax. "This VDP1 compute shader work is a major step forward in rendering quality for Yaba Sanshiro. The previous approach required tricks like vertex corrections and expanded drawing regions in order to bend modern triangle rendering toward VDP1's specification."

It's well worth reading through devMiyax's more detailed explanation of this new approach here, and it's also worth noting that the developer has been quite open about their use of AI in development.