Closed emoose closed 2 years ago
Continuing from the other issue:
Isn't the X360 port also missing transparency? Maybe X360 had a similar problem when the guide menu was brought up or something like that.
According to Albert, the X360 port did have transparency. QLOC messed it up in the UHD port.
IIRC D3D9Ex usually helps improve alt-tabbing in most games that have option for it,
Would be nice if we could get D3D9Ex working in this game. Would probably make #268 possible too. Not sure how hard that would be, though.
of course would be better if we could maybe find a way to skip the pickup transparency stuff during alt-tab instead though...
Maybe, as a workaround, we can force-close the pickup screen when Reset is called?
dxvk seems promising, didn't crash the couple of times I tried it out, haven't tested it that much yet though. Of course that won't help people that can't use Vulkan though (or where Vulkan maybe performs worse...)
Maybe, as a workaround, we can force-close the pickup screen when Reset is called?
Worth a try, hopefully there won't be any timing related problems with it, could be worth seeing if we can make Reset set a flag that skips the GXCopyTex
call inside ItemExamineHook
- or maybe it would have to be set from whatever tells game device is lost? IIRC there is some code in the game that handles error code related to that, maybe we could handle that in the d3d9 hook stuff though.
E: aha, checking for D3DERR_DEVICELOST
inside our hook_Direct3DDevice9::Present
, and setting pConfig->bRestorePickupTransparency
to false for it, seems to avoid the crash - you lose the transparency when alt-tabbing back in though, but that's pretty minor :p (E: actually that's probably because I forgot to add something to restore the bool, lel)
E: aha, checking for D3DERR_DEVICELOST inside our hook_Direct3DDevice9::Present, and setting pConfig->bRestorePickupTransparency to false for it, seems to avoid the crash
Ah, nice thinking with D3DERR_DEVICELOST! Should be a pretty simple workaround, then. Would still like to get EX working some day, though.
you lose the transparency when alt-tabbing back in though, but that's pretty minor :p (E: actually that's probably because I forgot to add something to restore the bool, lel)
Darn, restoring bool when D3D_OK didn't seem to help with that, I guess maybe item pickup screen stops the game behind it rendering it at all, and pickup is maybe taking a snapshot of it at the moment it was opened, but then device loss means that snapshot is lost until pickup screen is closed & reopened... too bad.
I'd guess 9Ex would be able to help with that since the buffer for snapshot should still exist AFAIK, probably worth looking into some time.
Talking about that snapshot buffer. Just in case it helps at some point during your code research, the final cutscene uses it during a camera angle change: https://youtu.be/tTp-iSN6rr4?t=3487 Of course, this was lost in the HD ports I think this is the only place in the entire game it's used this way... interesting
Oh, by the way, one of the issues this game has by default is also related to Alt+TAB the game. The flare lens effect gets bugged sometimes. https://youtu.be/CLhY4ruYvMU Could it be caused by the same problem?
Oh, by the way, one of the issues this game has by default is also related to Alt+TAB the game. The flare lens effect gets bugged sometimes.
Oh yeah, I was about to mention this one. Sounds like the same type of issue. Would be nice testing using DXVK to make sure.
As reported by @albertre4HD at https://github.com/nipkownix/re4_tweaks/issues/320#issuecomment-1225976828 (some more comments about it there too)
and tracked down by @nipkownix