libretro / beetle-psx-libretro

Standalone port/fork of Mednafen PSX to the Libretro API.
GNU General Public License v2.0
308 stars 131 forks source link

[OpenGL] Glitch in Chrono Cross effects #224

Open outoftime85 opened 7 years ago

outoftime85 commented 7 years ago

I'm not sure if this is related to the FF7/FF8 swirl reported in Issue 199, or if this is the best place to file a bug report, but I hope this is helpful nonetheless.

I'm running Retroarch 1.6.7 with Beetle-PSX 0.9.44.1 09d2a02 (from the Stable PPA) on Ubuntu 17.04 with a Nvidia Geforce GTX 970 driver version 375.66.

There are several visual glitches that I've seen in Chrono Cross when running in either Vulkan or opengl. The most obvious is the effects when a battle starts, which I've captured here.

Vulkan Vulkan1 Vulkan2

OpenGL Opengl1 Opengl2 opengl3

Software (works fine Software1 Software2 Software3

It may be hard to see with just screenshots, but I can work on figuring out screen recording if that would help. The main thing is there appear to be "windows" on the screen, boxes that I can see the effect moving within, but a lot of the rest of the screen in static. However this video at 5:04 shows the effect working fine, apparently with Vulkan and PGXP (side note, the above occurs whether PGXP is enabled or disabled. I've also tried enabling/disabling software framebuffer).

I wasn't able to get screenshots of it, but the same sort of glitch also occurred when what I assume to be a similar effect is used in the scripted sequence on top of viper manor. Here is an example of what it should look like. Instead of the character models in front of a black background, there seemed to be a cutout of the black background that was the initial profile of the character at the start of the sequence, but any action afterwards occurred behind it. I hope that makes sense. It would take a little bit of play time to get to that point from the most recent save I have, but if its helpful I can certainly do that!

Edit: Managed to catch a screenshot! chrono cross usa -170827-133414

I'm not expecting a quick fix or anything, just hoping that I can provide info to help improve the emulator in the future. Please let me know if there's any testing or other info I can provide.

ghost commented 7 years ago

@outoftime85 Can you confirm that when you're using the Vulkan renderer in Beetle, that you're also using the Vulkan video driver in Retroarch itself (Options > Driver > Video Driver) with it? I ran into a similar issue with #12 when testing an effect that appeared to be broken in Vulkan and OpenGL, yet worked with the SW renderer. Come to find out, you need to change the video driver to Vulkan in RA, as well as the renderer in Beetle, or it's still going to use the OpenGL renderer. @rz5 updated the readme help clear that up.

ghost commented 7 years ago

Did a quick test, results were as expected.

OpenGL chrono cross usa disc 1 -170907-150614 Vulkan chrono cross usa disc 1 -170907-150824 Software chrono cross usa disc 1 -170907-151015

outoftime85 commented 7 years ago

Thanks for looking into this. I can confirm I did not have Vulkan activated in the frontend (which is therefore likely the cause). Unfortunately I get a segfault when I try to start Retroarch with Vulkan, which I'll have to look into a bit more before I can test.

Edit: got Vulkan working (I had to install the libvulkan-dev package) and I can now confirm that the effect does work in Vulkan. Thank you!

inactive123 commented 7 years ago

The reason why that framebuffer effect looks correct on both the Vulkan and software renderers and not GL is because of mask bit emulation. This is also why Silent Hill's fog does not render correctly with the GL renderer, but it does with Vulkan/software.

We currently lack a person capable of backporting mask bit emulation from the Vulkan renderer to the GL renderer.

DukeJP commented 7 years ago

I have another problem, maybe related: using vulkan renderer in Libretro AND Beetle PSX HW, with the software framebuffer ON and all PGXP options set to Off, i get this glitches in the Hydra Marshes of Another World. ( 105892b1 version) The firste picture dont show much, but i get a flickering effect in every 3d model and some sprites, and the 2nd picture is the world map after exit of this "bugged" marshes, crashing completely the game. It even shows graphics of the previous screen. (i have the memory card file if you want to try). chrono cross-170913-192736 chrono cross-170913-192759

EDIT Switched to Opengl (both, in libretro and beetle) fixed the problem

...but enable other glitch with the "battle swirl"

ghost commented 7 years ago

@DukeJP If you could upload your .mcr, I'm curious to see if I could reproduce it.

DukeJP commented 7 years ago

Chrono Cross.0.zip

Just enter Hydra Marshes.

EDIT: im using a spanish translation, but the save works in the english version and has the same graphics glitch. I have finished both, english original and the fan translated in epsxe without glitches.

ghost commented 7 years ago

@DukeJP Identical results with my 1050ti with 385.41 drivers on Win7 64 using Vulkan. Recorded a quick video to show the flickering.

https://my.mixtape.moe/ckqnhg.webm 2017-09-13 22-02-25.zip

DukeJP commented 7 years ago

Good video. I have a similar crash in two other games: In Final Fantasy 7, the submarine minigame (either the plot obligatory, or the Gold Saucer arcade) and Front Mission 3, when load the Futai Tunnel minimap (the very first second of this video) https://www.youtube.com/watch?v=L4nMv7hLLPk

In both cases, even after change screen or load data, crashes completely the game.

NathanJPlummer commented 6 years ago

Confirming issue at the Hydra Marshes. Software 1x works. OpenGL and Vulkan both produce the above result. Current nightly. Geforce 1060.

EDIT: Interestingly enough, the bug only occurs on "Another World", not on the nearly identical "Home World" version of the marshes.

inactive123 commented 6 years ago

Due to lack of mask bit emulation in the GL renderer. Unfortunately, despite asking around, nobody wants to backport it from Vulkan to GL, so we are stuck there.

inactive123 commented 6 years ago

Whether this bug is directly attritutable to mask bit emulation is now in doubt.

NathanJPlummer commented 6 years ago

@twinaphex

I can confirm- at least as of six weeks ago when I last played this game- the bug occurs under Vulkan, too.

If I remember when I get home I'll try it again tonight.

Mkilbride commented 6 years ago

I am having an issue like this with everything fickering. Did not happen initially until I increased the CPU Overclock beyond 100%. I reduced it to 100% again, exited RetroArch, tried the game again, but it continues.

DukeJP commented 6 years ago

I test this game now. The flicker glitch in Hydra Marshes is there with 6a804da . But the game works ok after exit the Marshes, the game dont crash.

DukeJP commented 5 years ago

Tested the game today, with Vulkan renderer, and 9ebdeb5 . Works ok for me, no glitches or crashes!!!

klepp0906 commented 5 years ago

battle swirls are still a hot mess with OGL. Unfortunately I play remotely and steam+vulkan dont get along.

Leaves me with software (which wouldnt be so bad if it didnt require completely different viewport settings) or simply dealing.

Anyone know if this and the "heat-effect" glitch in xenogears is a result of the same bug and/or mask bit emulation?