Saturday, June 2, 2018

Prince of Persia: The Sands of Time





3D Vision fix for Prince of Persia: The Sands of Time. Tested with the GOG version.


Fixed
- Effects like fog and bloom are correctly stereoized thanks to the driver profile tweak in the installation steps.
- Water effects, if you turn on that effect in the graphics options.
- HUD is now at screen depth instead of being affected by convergence. See the "F4" and "F5" hotkeys. The pause and main menu interfaces were already at screen depth and aren't affected by the depth presets.


Installation
- Open the "Prince of Persia" profile with Nvidia Profile Inspector and set "StereoTextureEnable" to "0x00000027" as shown in this image.



- Download this file and extract its contents in the "Prince of Persia The Sands of Time" folder, where "PrinceOfPersia.EXE" is.
- Preferably download the widescreen mod from here to be able to use any resolution and rename its "d3d9.dll" to "d3d9_res.dll" before copying the files to the game folder. Alternatively, and in case something happens to that website, I've packed the fix with the widescreen mod together. You may prefer to download this directly.
- Open "pop.ini" (the config file of the widescreen mod) and set your resolution and other settings to your liking.
- Open "DX9Settings.ini" and change the "ProxyLib = D:\GOG\Prince of Persia The Sands of Time\d3d9_res.dll" line to the path of your "d3d9_res.dll". Remember to not use quotes.
- Launch the game.

Both fix downloads contain my "prince_of_persia_profile.nip", which is the game profile already configured for 3D and also with 8xMSAA + 8x Transparency Supersampling. It also has HBAO+, but I think I read it's something that can't be forced at the same time as 3D Vision is enabled.


Hotkeys
- F1: high convergence preset.
- F2: medium convergence preset.
- F3: low convergence preset.
- F4: HUD depth presets.
- F5: HUD toggle. Not disabled by default.
- F6: blur effect toggle. It also disables the low resolution distortion effect that appears when you go back in time. Not disabled by default. I recommend using this if you want a clearer picture, as the screenshots above show.


Bloom disabling (optional)
I couldn't make it a toggle successfully, so it's a static shader file that will disable the effect instead. If you want to use it, open the "disable_bloom" folder and merge its "shaderoverride" folder with the one in the game folder. Delete the "shaderoverride/pixelshaders/ABB07F2E.txt" file when you want to enable bloom again.


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

23 comments:

  1. Thanks masterotaku, I think it's considered to be the best in series, I'll buy it next time it's on sale :)

    ReplyDelete
    Replies
    1. I'm glad that you like it. I'm doing a proper POP Warrior Within fix too (save for one screen depth distortion effect it's perfect) that I'll publish when I finish the game, and then I'll do POP The Two Thrones.

      Delete
    2. Pressing 'R' to slow the time makes the game VERY blurry when it (slowing) ends (when blur is disabled). You have to Alt + Tab to minimize the game to fix it.

      Also what exactly F1 - F5 are supposed to do? I don't see any difference when using them in comparison to F6 where the effect is obvious.

      Delete
    3. I'm using the Steam version, and I'm not seeing this extra blur when slow-mo or rewind ends. It seems OK to me, and doesn't stay blurry where I'd need to alt-tab out.

      F1-F3 are different convergence levels, just a convenience. You can use F3 for example when a cut scene plays, to make it easier to see.

      One thing though- I did need to disable the Fog setting, it wasn't playable until I did that, and it's not in the instructions.

      Delete
    4. I also had issues with the game getting blurry when using slow-motion.
      But just figured out that it was caused by shaderoverride/pixelshaders/ABB07F2E.txt, which I think is supposed to disable the game's bloom permanently, but instead the game still runs with bloom on by default whether that file's present or absent and pressing F6 still toggles it, but for some reason removing that file fixed slow-motion.
      Perhaps it was a leftover?

      Delete
  2. Hi, it is Great many thanks. But is there any way to toogle F6 (blur remove) automatically at start ?

    ReplyDelete
    Replies
    1. Sure, just change the order of the toggle in the DX9Settings.ini file. Under [Key6] section make it Presets=13;12; (can't totally recall, might need to move the UseByDef=true line from Pres13 to Pres12.)

      Delete
    2. I tried but it doesnt work.
      https://postimg.cc/CBxXvKcX
      https://postimg.cc/7Gtcjyc6

      Delete
    3. You'd want to just move the UseByDef=true to Pres12. Can't be in both places. Maybe try leaving the order the same (12,13), but just move that line.

      Delete
    4. yeah it Works now. AWESOME ! many thanks.

      Delete
  3. F1 to F5 not working or i did something wrong? my HUD is gone by default.

    ReplyDelete
    Replies
    1. Just tested this here, and it was working OK. Win10 21H1, Driver 452.06. Steam version. I used HelixVision to launch and setup. All F-keys were working as described. HUD was available.
      Might be worth trying a clean reinstall of the game, including deleting preferences.

      Delete
  4. Is there a way to use this alongside Reshade?

    ReplyDelete
  5. Is there a way doing the Step 1 using Intel HD Graphics?

    ReplyDelete
  6. Please tell me, what values should I choose in the new version of NPI? Those 0x00000027 entries are no longer there.

    ReplyDelete
  7. Please tell me , does this fix with the blurr and settings in nip work in tandem with this set of fixes?
    https://www.moddb.com/games/prince-of-persia-the-sands-of-time/downloads/sands-of-time-fix-compilation
    There is no d3dx9 file in this set that would be responsible for the resolution , it seems to be called durgom , if I understand correctly , then this POPLauncherRes.DLL But I'm not sure. And with this prince_of_persia_profile file, does it need to be activated somehow ? How do I understand that it is used?

    ReplyDelete
  8. It's a very interesting mod, especially the feature that turns off the blur shader, which results in amazing clarity. However, yesterday, a 4k mod for textures was released, which also uses the d3d9 injector. In this regard, I have a question: how can I make both mods work without conflicting with each other?

    ReplyDelete
  9. In other words, is it possible to rename your d3d9 dll to a different name that the game can recognize?

    ReplyDelete
  10. Everything worked out; I had some quotes, and because of them, the other d3d9 wasn’t being picked up. In general, those who will be using the texture pack that Evgeny released on Nexus, rename the d3d9 dll, for example, to d3d9_other, and specify the path to this d3d9_other in the Proxylib line in DX9Settings ini (make sure there are no quotes).
    ProxyLib = F:\GOG Games\Prince of Persia - The Sands of Time\d3d9_other.dll
    And here new great texture pack :
    https://www.nexusmods.com/princeofpersiathesandsoftime/mods/22

    ReplyDelete
    Replies
    1. You need to rename his d3d9 file to d3d9_other.

      Delete
  11. But who could tell me how to install Reshade correctly so that it works? Since, due to the large number of mods, Reshade doesn’t even load. We need a clever way to run Reshade as a portable version. Maybe someone has found a way? The question will probably remain unanswered, but maybe someone will check here :)

    ReplyDelete
    Replies
    1. So many questions. I don't use 3D Vision anymore, so I can't help much about that. If I were making the fix nowadays, I would do it with dgVoodoo + geo-11. Perhaps someday.
      The game also works with wiz3d but it has some HUD issues like subtitles flying out of the screen at normal convergence levels, but water is correct as is.

      Delete
    2. Hi. I have 3D working on driver 576.88 thanks to 3D Fix Manager; it has integrated the stereoscopic function into my drivers, but I only set HD 3D to 1280 by 720 so that it runs at 60 Hz. Plus, this fix is included. I also don’t have a 3D Vision monitor :) I have an active 3D TV, Sony W905a, but unfortunately, I couldn’t successfully modify the Edid as needed to set the resolution to 1920 by 1080 and 60 Hz. At Full HD, it’s only 24 Hz with this fix. Wiz3d is also a good tool, but it uses d3d9, and the new 4K textures also use the d3d9 injector. I proxied it via the DX9 settings ini, but I don’t know if it’s possible to add another file to the proxy and how to do it correctly :) Please tell me, do you have the ability to create a 3D fix for a game like Broken Sword Reforged? :)

      Delete