skmp / reicast-emulator

Reicast was a multiplatform Sega Dreamcast emulator
https://reicast.emudev.org
Other
1.1k stars 345 forks source link

Cannon Spike unplayable. #898

Closed blackman91 closed 6 years ago

blackman91 commented 8 years ago

Using the latest dev version and the stable version on android the game is full of black graphical bugs, a shame really was looking forward to this game i mean it has freaking MEGAMAN.

screenshot_20180516-183939

http://loungekatt.no-ip.biz:3194/ReicastBot/report/logs/1452876490320.txt

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29912395-cannon-spike-unplayable?utm_campaign=plugin&utm_content=tracker%2F500311&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F500311&utm_medium=issues&utm_source=github).
inactive123 commented 8 years ago

I think it's just fog rendering missing from the GL renderer.

blackman91 commented 8 years ago

Nope, it happens in stages without fog too: http://s1312.photobucket.com/user/talos910/media/reicastbug3_zpsyx9cdjdi.png.html

inactive123 commented 6 years ago

Sure, I just made one for the Cannon Spike compatibility. I will be asking @hunterk to drop some money into it just to get the ball rolling, hoping for others to chip in too.

Users can create a Github issue here -

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

I can later attach the bounty label to it then. Users can then go to Bountysource, input the URL of the Github issue, and then attach money to it.

AbandonedCart commented 6 years ago

This may still be a fog issue. In a really simplified way of describing it, sometime it is easier to just remove the effect without actually changing the rendering.

skmp commented 6 years ago

@twinaphex We can use this ticket to track the progress. Can you cross link from the bounty page?

blackman91 commented 6 years ago

So this is apparently fixed now: https://youtu.be/BoDjdQDBZKw

Nice! Amazing job guys, are those fixes available on the standalone too?

AbandonedCart commented 6 years ago

https://github.com/reicast/reicast-emulator/pull/1151 https://github.com/reicast/reicast-emulator/pull/1152 ^ These are the improvements being cited in the video.

blackman91 commented 6 years ago

Awesome! Are those improvements going to be merged into the Android build? Finally Cannon Spike Playable portably.

skmp commented 6 years ago

I think I merged both of the PRs today?

On Sat, 9 Jun 2018 at 22:15, blackman91 notifications@github.com wrote:

Awesome! Are those improvements going to be merged into the Android build? Finally Cannon Spike Playable portably.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/reicast/reicast-emulator/issues/898#issuecomment-395995704, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYAMtH2FK8ZycSNMlGPvUKYWMXIwt7Zks5t7Cz3gaJpZM4HF3Ya .

-- ~skmp

skmp commented 6 years ago

Yeah, both of them should be in the latest master build

blackman91 commented 6 years ago

Nice! Are the improvements coming to the lk/android-studio branch too? The one with the settings fixed for Android 7 and up.

blackman91 commented 6 years ago

I tried latest master on Android but I still get the same bugs in cannon spike, do I need to enable any particular setting.

blackman91 commented 6 years ago

Tried latest master on another Android device where settings are accesible but no setting fixes the graphics: screenshot_20180609-153417

AbandonedCart commented 6 years ago

2018-06-09T21:12:45.000Z

This is from Android Studio with 1151 and 1152 integrated. It seems the issue with this game may not be directly related.

blackman91 commented 6 years ago

That's so weird then how did the libretro dev managed to fix it as shown in the video? What changes did he port?

skmp commented 6 years ago

libretro has some other workarounds for depth, that might be stacking up

On Sun, 10 Jun 2018 at 06:22, blackman91 notifications@github.com wrote:

That's so weird then how did they libretro dev managed to fix it as shown in the video? What changes did he port?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/reicast/reicast-emulator/issues/898#issuecomment-396019439, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYAMkNd3RMglT8guOu24v2NBv2z9xMGks5t7J7zgaJpZM4HF3Ya .

-- ~skmp

inactive123 commented 6 years ago

Yeah, this game runs properly now on the libretro core. Maybe it's the log2 depth commits in combination with the fog table ?

blackman91 commented 6 years ago

Is this game fixed in both Reicast Retroarch cores or just in Reicast OIT?

blackman91 commented 6 years ago

Just tested it and it works in both Reicast Retroarch cores:

reicastretroarch

Still not working on standalone reicast for some reason.

blackman91 commented 6 years ago

Are the log2 depth commits and fog changes coming to standalone reicast?

AbandonedCart commented 6 years ago

It depends if they can be isolated into specific changes and still solve the specific issue after being added. Otherwise, it may be easier to start fresh attempting to resolve the issue directly.

Deivmsr commented 6 years ago

I follow your work and I always try a new Reicast build. But LoungeKatt do you have plans to do that on this issue? Maybe it could help to correct the lack of shadow in the King boom boo boss of Sonic Adventure 2, because in the last implementation of the volume modifier of yours this problem in my Note 8 with Mali GPU this has not been solved.

flyinghead commented 6 years ago

Most problems with this game are Z depth issues, that can be solved using the log2 depth scaling. Fog is used on some levels but doesn't affect playability that much I believe.

skmp commented 6 years ago

log2, or any other transform that is non linear, causes problems with intesecting geometry. nullDC had four depth handling modes iirc. One linear, one non linear, an fp32 mode and a per-pixel non linear fallback (slow, but almost pixel perfect)

On Wed, 27 Jun 2018 at 08:10, flyinghead notifications@github.com wrote:

Most problems with this game are Z depth issues, that can be solved using the log2 depth scaling. Fog is used on some levels but doesn't affect playability that much I believe.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/reicast/reicast-emulator/issues/898#issuecomment-400554109, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYAMoRfGYTXgKq6PR_fPmmkwurLj_R1ks5uAyHdgaJpZM4HF3Ya .

-- ~skmp

Deivmsr commented 6 years ago

I do not understand programming, I'm just a user, but would not it be possible to add these depth options? It is very bad you need a simple shadow in Sonic Adventure 2 to progress in the game and realize the lack of it. If you had an option to enable / disable this feature it might help, theoretically.

flyinghead commented 6 years ago

I'm not familiar with nullDC but at first look it seems the z scaling was applied in the vertex shader. If the scaling is not perspective-correct then you get weird graphical issues (like straight lines not being straight...) The log2 scaling I'm referring to is applied in the fragment shader, so it doesn't have to be perspective-correct since it's only used for the depth test. However you need support for gl_FragDepth in the GL driver, and that means GL ES 3.0 or later, or full GL. And it probably impacts performance since using it disables some GL optimizations such as early depth test.

skmp commented 6 years ago

It has to be perspective correct, because the dreamcast uses screen space and not world based coordinates. Doing it per pixel preseves the linearity of the interpolation, and all is good. Doing it per vertex introduces weird artifacts over large triangles, like sea in SA2.

Yes, we dhould have both options, and default to the best one.

On Wed, 27 Jun 2018 at 15:28, flyinghead notifications@github.com wrote:

I'm not familiar with nullDC but at first look it seems the z scaling was applied in the fragment shader. If the scaling is not perspective-correct then you get weird graphical issues (like straight lines not being straight...) The log2 scaling I'm referring to is applied in the fragment shader, so it doesn't have to be perspective-correct since it's only used for the depth test. However you need support for gl_FragDepth in the GL driver, and that means GL ES 3.0 or later, or full GL. And it probably impacts performance since using it disables some GL optimizations such as early depth test.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/reicast/reicast-emulator/issues/898#issuecomment-400671272, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYAMlfeHsySaByDeewGYoMG6ODLs1b4ks5uA4iRgaJpZM4HF3Ya .

-- ~skmp

blackman91 commented 6 years ago

Anyway you could somehow add the bounty from https://github.com/libretro/reicast-emulator/issues/27 to this issue?

AbandonedCart commented 6 years ago

It's already added. The green Bounty Granted label specifies that it has a bounty attached.

skmp commented 6 years ago

Closing this in favor of reicast/gamedb#15. Please make sure all relevant information is there.

blackman91 commented 6 years ago

These changes fix cannon spike on Android: https://github.com/reicast/reicast-emulator/commit/6190c5e

https://github.com/reicast/reicast-emulator/commit/958447f

Any chance the changes can be added to standalone? Cannon spike is still not playable on standalone reicast.