PCSX2 [DX11]






3D Vision feature for PCSX2, the PlayStation 2 emulator (DX11 hardware renderer). It uses a manual shader stereoization method without using physical shader files, for better future compatibility.

ANOTHER IMPORTANT UPDATE (2018-03-16): updated for 3Dmigoto 1.3.6, now compatible with ReShade without needing extra steps unrelated to ReShade (I've tested it as dxgi.dll. Its ingame interface, shaders and hotkeys were working fine). Also, at some point in time it started triggering 3D without SpecialK (the old "d3d9.dll" and "d3d9.ini"). That means no more booting games in a weird manner! It isn't caused by the new 3Dmigoto. It may have been drivers or Windows updates, I'm not sure.
SBS, TAB and other 3D modes now run flawlessly. Check the updated instructions and delete all you had from the previous fix, except for the workaround to make 3Dmigoto load in Windows 10. Old version here.

IMPORTANT UPDATE (2018-01-19): fix updated. the new 3Dmigoto 1.2.70 allows me to stereoize render targets automatically. It means that custom resolution tweaks or "Large Framebuffer" aren't needed anymore.


Warning number 1: this isn't as "plug and play" as PC games fixes. It will need user involvement depending on how much you want a perfect experience, because it's impossible to have all games fixed at the same time. It also requires games to be booted a certain way.


Installation
- Get a recent PCSX2 build, equal or newer than "pcsx2-v1.5.0-dev-2324-g6aaae6970-windows-x86". Download links are here.
- Configure the graphics plugin (GSdx) to use the DX11 hardware renderer.
- For PCSX2 to be able to see the "d3d11.dll" of the fix on Windows 8.1 or higher, you need to apply this patch for the moment. If the bat file doesn't work, using the "sdbinst d3d11_fix.sdb" in CMD with admin rights may work.
- Download the fix here and unzip its contents in your PCSX2 folder.
- If you have Windows 7, chances are that PCSX2 won't trigger 3D Vision. If that's the case, unzip this there too and follow the old instructions to boot games.


Booting games
Nothing special is needed now. Just make sure you're using DX11 hardware mode and double click the window if you didn't configure PCSX2 to boot games in fullscreen directly. It will automatically use your full resolution and trigger 3D. Switching to other renderers won't crash the emulator anymore. They just won't be 3D.


Old instructions, not needed anymore:

This needs a special procedure. After installing all the needed files, if you try to open the GSdx configuration, the emulator will crash. Follow these steps:

- Open the emulator.
- Choose a game (choosing the ISO from the recent list, or searching one manually...) and boot it.
- After graphics of the game start to appear, or at any moment after that, open the GSdx configuration (you can press escape to close the game or just open the configuration directly), change settings if you want, and then close it. It doesn't matter if you apply changes or not. This action will unlock esclusive fullscreen, needed for the next steps.
- Double click on the game window so it's resized to borderless fullscreen.
- Press alt+enter, and the game should trigger exclusive fullscreen and 3D Vision.
- If it doesn't work at first try, double click again until it's borderless fullscreen and try pressing alt+ enter again.


GSdx configuration requirements and recommendations


1- Interlacing: games that shake when the option is set at "None" will most likely be perfect with the "Bob tff" option, and in some rare cases, "Bob bff". Knowing is a game is interlaced (half vertical resolution, which most of these shaky games have) is important for the next steps.

2- Large Framebuffer: it's needed for 3D when you play at 3x native resolution or higher IF the game doesn't have a "progressive scan" mode or cheat code. Warning number 2: this option increases VRAM usage A LOT at 5x-6x native resolutions and higher. Unneeded after the 2018-01-19 fix.

3- Custom resolution: it's needed for 3D IF you are playing an interlaced game (unless you play at native or 2x native) OR IF you really don't want to use "Large Framebuffer". Interlaced games need a higher than normal vertical resolution. Example: Devil May Cry only works in 3D with 3840 horizontal resolution if the vertical resolution is 2879 or higher.
Note: there are ways of forcing 3D via "TextureOverride" in "d3dx.ini". Read the shader overrides explanation. Unneeded after the 2018-01-19 fix.

4- Enable HW Hacks: some games need some of these to render right, especially "Align Sprite" (some Namco games like Soul Calibur 3 or Tekken 5), which demands native resolution multipliers, and "Half-pixel Offset", to have some bloom effects at their correct position. Things not related to 3D.


Use of regex toggles
This fix was done without using physical shader files, for better future compatibility. Instead, it uses a real time "find and replace" function for exactly three shaders that control all geometry in all games.

The problem is that some effects of those shaders need to not be stereoized, like the HUD or some double stereoized effects (sometimes bloom, blur filters, shadows...). The regex function tries to not stereoize things that have a depth value of 0 or 1, and in some games it works (most of the HUD of the Kingdom Hearts games).

The first and most simple solution, which may be partial or fix some things and break others but it's useful many times, is using three hotkeys I offer to disable stereoization in each of the three shaders that control geometry. They are "j", "k" and "l", and I'll refer to them as "regex 1", "regex 2" and "regex 3". And that's also their order of importance, as you'll almost never have to disable the first one. A lot of times a mix of regex 3 and regex 2 will fix HUD issues, but regex 2 is usually related to other effects. In the "PCSX2_3D_game_database.txt" file I include I made a compilation of results of games I have and when you need to disable regex 2 and/or 3 or none.


Use of shader overrides. Warning number 3: for advanced users and perfectionists
Sometimes, or usually, disabling some of the regex isn't enough to make a game perfect or almost perfect, because you will be disabling more things than needed. Or maybe the HUD is related to regex 1. In these cases, you need to tell the regex to not stereoize a specific pixel shader. This is where things get more complicated, for these reasons:

1- Future PCSX2 (specifically GSdx) builds may change the hash of the generated shaders, rendering all game specific fixes useless. Still, games don't usually need a lot of these. Most of the affected games need between 1 and 3 in my experience.
2- Fixing something in one game can break something else in another game, or even in the same game in some cases. So fixing all games at the same time is impossible. Even with a small library of 30 something games I found a little more than 10 conflicts between games.

Now about how to do a shader override. The fix includes working examples for games I own. Check the "d3dx.ini" file, under "Specific game fixes". The first elements you will see are:

[ShaderOverrideRegex1VS]
Hash=6d64bfd710f98b05
x3=0
w3=0
[ShaderOverrideRegex2VS]
Hash=0c8511661cbc3936
y3=0
[ShaderOverrideRegex3VS]
Hash=a1f8cd42ceaae9e9
z3=0

Those are the three vertex shaders I stereoize with regexes, and their default values for stereoization. "x3" for regex 1, "y3" for regex 2, and "z3" for regex 3. "w3" is an extra option about the fix I made for the skybox in the Ratchet & Clank saga (it forces the skybos to max depth without breaking other things in those games).

The values after "Hash=" may change with future GSdx versions, but I will be able to recognize them and update the fix.

Sections below them are game fixes with comments saying what they fix. They contain the hash of the pixel shader, and the value they pass to their parent vertex shader. If you write for example "z3=1", it means that regex 3 won't stereoize that specific pixel shader. If it's "y3=0", it means it will stereoize it, the same as not writing the shader override at all. Useful if you want to enable/disable game fixes break effects in other games.

How to get the pixel shader hashes? Search the "hunting=0" line and change it to "hunting=2".

Warning number 4: this will make games less stable when switching out of fullscreen, and VRAM usage will be higher.

After that, run the emulator and play the game you want. Press "0" in the numpad and you will see a green overlay. Numpad keys 1 and 2 will cycle through the available pixel shaders, disabling the current one. Numpad key 3 will dump the shader inside the "ShaderFixes" folder. Get the hash (filename part before "-ps_replace.txt"), open the "ShaderUsage.txt" file that will appear in the emulator folder and search that hash. Example of a random pixel shader:

<PixelShader hash="07ee058e5bed1e6b">
  <ParentVertexShaders>6d64bfd710f98b05 </ParentVertexShaders>

The pixel shader "07ee058e5bed1e6b" is related to vertex shader "6d64bfd710f98b05". If you look a few paragraphs above in this post, you will see that it's regex 1. If you want to not stereoize that effect, write this in "d3dx.ini", below the other shader overrides:

[ShaderOverride_TotallyUniqueNameOrElseError]
Hash=07ee058e5bed1e6b
x3=1

Then you can go back ingame without closing it, make the game 3D with the explained method, and press F10. Changes should be applied instantly (it will also reset the state of all hotkeys).

When you are done, close the game and set "hunting" to 0 again. And you can delete your dumped shaders that are inside "ShaderFixes".

Note: the included "d3dx.ini" includes shader overrides for many games I have (with explanations about what they affect). There could be conflicts with other games, as I have explained. If you suspect they could be interfering with your game of choice, delete them, but not the regex ones that are at the start.


Texture overrides
With this, you can force games to be 3D that you want to play with native resolution multipliers, without needing "Large Framebuffer" or custom resolutions, for games without progressive scan mode. Dump any pixel shader, as previously explained. Check "ShaderUsage.txt" and go to lines starting with "<RenderTarget orig_hash=". Get the hash of all render targets there and write it like this Devil May cry example in "d3dx.ini":

;Stereoization of 3840x2160 in DMC.
[TextureOverride1]
Hash = c742d5b7
StereoMode = 1
[TextureOverride2]
Hash = 3e068917
StereoMode = 1
[TextureOverride3]
Hash = afead9ca
StereoMode = 1
[TextureOverride4]
Hash = 98dd53df
StereoMode = 1

After reloading with F10 or running the game again, it should be 3D. However, every resolution has different hashes. Remember to disable hunting mode.

 Unneeded after the 2018-01-19 fix.

Hotkeys
You will probably need at least some of these hotkeys (which you can configure in "d3dx.ini") when playing:

- v: it changes the type of stereoscopic cameras. By default, both eyes get a modified view for 3D. With one click, the right eye will have the same camera angle as 2D and the left eye will do all the 3D work. One more click, and the opposite will happen. And the last preset returns it to normal. It can be useful for games that stereoize the HUD, making it invisible at normal convergence modes. With the dominant eye you will see all game effects normally.

- b: toggle to unstretch 4:3 games from 16:9. It will be buggy depending on the game, and the sides will flicker. Avoid using this if possible.

- j: regex 1 stereoization toggle.

- k: regex 2 stereoization toggle.

- l: regex 3 stereoization toggle.

- h: convergence presets. Different games may need wildly different convergence levels. I tried to cover as many cases as I could.

- g: multiple God of War 1 and 2 separation and convergence combination presets, from higher to lower. These games present geometry with very compressed depth. This is a workaround that makes them normal. Each preset was carefully crafted, so don't touch your Nvidia convergence hotkey or convergence presets. The Nvidia separation hotkey or wheel is OK to use. Don't use this hotkey with other games unless you find another like them.

- f: toggle for moderately higher max separation. Some games like Soul Calibur 3, Tekken 5, Ys IV and Ys V use a lower separation than the rest of games. 5.6cm instead of 7cm in my monitor. This hotkey makes them have the same depth as the other games. Don't use it with unaffected games unless you know you want it.


Fix updates
I will probably keep updating this if PCSX2 changes the regex shaders. Also, exclusive fullscreen may be an official feature in the future, which will make the included "d3d9.dll" and "d3d9.ini" unnecessary. And it will also make the game booting process simpler and more stable.

I also keep the "d3dx.ini" file in my github account. If the date of that file is newer on github, use it instead of the one that comes with the fix, because it may contain small fixes.

User contributions for shader overrides are welcome. Just know the risk of them becoming obsolete in future PCSX2 updates. The fix was first done using "pcsx2-v1.5.0-dev-2249-g49cd6bc78-windows-x86", and I can confirm a build few versions newer than this, used by a different person with different drivers, was compatible with all shader overrides.


Side By Side / Top And Bottom / Interlaced compatibility
Uncomment the ";run = CustomShader3DVision2SBS" line in "d3dx.ini" and then press F11 ingame (once it triggers 3D) until you have your desired mode.

This below was for the old version of the fix and it's unneeded now (I'm keeping it just in case):

Normally you would have to uncomment the ";run = CustomShader3DVision2SBS" line in "d3dx.ini" and then press F11 ingame (once it triggers 3D) until you have your desired mode. However, the game window stays black when you try to do it.

The workaround is not enabling that line, starting the booting process until after you have "unlocked" the exclusive fullscreen possibility, uncommenting the ";run = CustomShader3DVision2SBS" line, saving changes, going ingame in fullscreen mode, pressing F10 to reload the configuration, and then pressing F11 until your 3D mode is selected.

Painful, I know. I don't know a way to fix this completely. But the workaround works.


Special thanks
- All 3Dmigoto developers and contributors (bo3b, DarkStarSword, Flugan...).
- All PCSX2 developers and contributors. Without them, we wouldn't be able to even play these games in 2D.
- Kaldaien, for the specific SpecialK build I used in older fix versions to force exclusive fullscreen (0.7.0).
- RibShark, the one who made the compatibility patch to make 3Dmigoto work with PCSX2 on Windows 10.
- Kaimasta, for helping with testing and giving good ideas and inspiration, like the God of War hotkey.



If you liked this and want to contribute for more future fixes, you can donate to this PayPal account: masterotakusuko@gmail.com

Comments

  1. permainan sabung ayam online terprecaya
    Tersedia 2 Jenis Taruhan Sabung Ayam Live
    Sabung Ayam S128 - SV388
    Raih Kemenangan Anda Bersama Kami...
    Untuk Info, Bisa Hubungi Customer Service Kami ( SIAP MELAYANI 24 JAM ) :
    Telegram : +62812-2222-995 / https://t.me/bolavita
    Wechat : Bolavita
    WA : +62812-2222-995
    Line : cs_bolavita

    ReplyDelete

Post a Comment