nmlgc / ssg

秋霜玉 / Shuusou Gyoku

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optionally render circles as point lists to replicate their 8-bit rendering on GPUs

nmlgc opened this issue · comments

commented

In 8-bit mode, Shuusou Gyoku draws circles by writing pixels along the accurate outline into the framebuffer:
Screenshot of Shuusou Gyoku's circle drawing in 8-bit mode as shown during the Marisa boss fight. Nice and smooth.

In the GPU-accelerated modes, circles are instead approximated by straight lines along a 32-sided polygon. This is easier to render on GPUs, but noticeably jaggier, and might stick out at the larger resolutions this game will be scaled to.
Screenshot of Shuusou Gyoku's circle drawing in 16-bit mode as shown during the Marisa boss fight. Noticeably jaggy.

I chose to keep the 32-sided polygon for the SDL_Renderer port (#4) mainly for preservation reasons and consistency with the Direct3D backend. Since the 8-bit implementation confirms the intent ("it should just be a circle"), we could replicate the 8-bit behavior on a GPU by sending a list of all the exact points that the 8-bit version would write. But there is no reason why choosing one method over the other should be a backend question – in SDL, we'd use SDL_RenderDrawPoints(), and even old Direct3D has the D3DPT_POINTLIST primitive.
Instead, perfect circles would be a frontend option, selectable in the Graphics menu.