Flycast: Cannon Spike compatibility [$10]

Created on 17 May 2018  路  6Comments  路  Source: libretro/flycast

Apparently Reicast still has several graphical issues with this game.

Graphical glitches can be seen here -

https://github.com/reicast/reicast-emulator/issues/898

The goal of this bounty is to be able to play this game without these severe graphical glitches.


Did you help close this issue? Go claim the $10 bounty on Bountysource.

bounty

Most helpful comment

I added $10 to the bounty. In order to add your own money, go to Bountysource, take the URL from this issue, input it into the bar below the text 'Paste any URL to post a bounty.'. From there you can then add money if you are already signed on. You can also sign on there using your Github account.

All 6 comments

So, how do I donate to this bounty?

I added $10 to the bounty. In order to add your own money, go to Bountysource, take the URL from this issue, input it into the bar below the text 'Paste any URL to post a bounty.'. From there you can then add money if you are already signed on. You can also sign on there using your Github account.

Apparently this fixes all the Cannon Spike graphics bugs:
https://github.com/reicast/reicast-emulator/issues/1144

Depth Buffer Fixes
On the Dreamcast, vertices are submitted for rendering in screen space, with the z component being equal to 1/w. These values are not normalized to any particular range, which is fine for the PowerVR's 32-bit floating-point depth buffer. When rendering in OpenGL, these vertices must be converted back to normalized device coordinates. While unprojecting the x and y components is trivial, getting a z value that maintains the same depth ordering is not. Originally, redream linearly scaled the z-component to the range of [0.0, 1.0] with the equation z = (z-zmin)/(zmax-min) and passed it off to the depth buffer. This worked ok for many games, but some games had an extremely large z range (e.g. zmin of 0.000001 and zmax of 100000.0) which caused a serious precision loss when normalizing, especially after the value was quantized to a 24-bit integer to be written to OpenGL's depth buffer. After writing a small tool to measure the accuracy of the results of different normalization methods, the previous linear scaling was replaced with the logarithmic equation z = log2(1.0 + w) / 17.0. Using this method, the accuracy of the depth ordering went from as low as 30% to 99% in every problematic scene I could get my hands on.

This is fixed now in latest master.

Any way you could fix it in standalone reicast too?

Any chance you could you transfer the bounty to:
https://github.com/reicast/reicast-emulator/issues/898

Now that they have bounty support that would be cool. The issue is still present in standalone reicast.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  4Comments

Shoegzer picture Shoegzer  路  3Comments

spielvan picture spielvan  路  5Comments

hiddenasbestos picture hiddenasbestos  路  9Comments

Myst3r90 picture Myst3r90  路  5Comments