Silent Hill 4 messed up overlay menues & effects

  • v00d00m4n
  • Topic Author
More
9 years 2 weeks ago - 9 years 2 weeks ago #1 by v00d00m4n Silent Hill 4 messed up overlay menues & effects was created by v00d00m4n
Reshade 0.17.1 here.

Tried as d3d8 - and got this mess:

[img

[img

[img

[img


To put it simple - menues, overlays, screen buffer effects and any stuff that should be rendered above normal 3d scene have their left upper corner in a center of screen.

Tried all of ENB's d3d8 wrappers, every one crashed, except for special version from moddb 0.005 but with it still had same problems because it actually was not wrapper but was a dx8 version of enb and Reshader used internal wrapping.

Used recent pandora tomorrow d3d8 fix, used WOFF_D3D9_Extended.20140325.Beta and simple version, no luck!

Was trying to fix this with Wine D3D8 to OpenGL wrapper (which works 100% correct without reshade, fully translates game to OGL) and used reshade as OpenGL32.dll, but unfortunately requirements for OGL 4.3 is very high, and only GF GTX 400+ card range supports it, while im using laptop with GTX 200 series. Thats kinda offtopic, but can you lower please OGL specs to at least 3.0 and request GL features of higher version only on demand if shader really needs them (you can use some heuristics and templates to tell is shader used something than needs OGL above 3)? Support for just 6 generations of cards just to add post effects to some old games (and WINE d3d8 wrapper is the best and most compatible so far, so usage of OpenGL in Reshade would probably work better than internal d3d8 wrapper for a while) kinda dissapointing and pretty limiting, and in this particular case lower ogl support could have temporary solved d3d8 issue by using older and more "grown up" wrapper such as wine. Btw i suggest to look at it sourcecodes of d3d8 to improve internal wrapper.

Log here
pastebin.com/kMi60LMX

Oh one more thing, SH4 uses ugly low res buffer effects which are 640x480 or even 512x512, judging by lines:
03/04/2015 21:28:06:531 [08936] | INFO | Redirecting 'IDirect3DDevice8::CreateImageSurface(06797358, 512, 512, 21, 006E8E00)' ...
03/04/2015 21:28:06:533 [08936] | INFO | Redirecting 'IDirect3DDevice8::CreateImageSurface(06797358, 512, 512, 21, 006E8E04)' ...
03/04/2015 21:28:06:533 [08936] | INFO | Redirecting 'IDirect3DDevice8::CreateImageSurface(06797358, 256, 256, 21, 006E8E08)' ...
03/04/2015 21:28:06:544 [08936] | INFO | Redirecting 'IDirect3DDevice8::CreateImageSurface(06797358, 128, 128, 21, 006E8E0C)' ...

one effect is sort of pseudo DOF when you activate any item, it just pixelated and juggy as hell, and another is sort of bloom (can be seen in very 1st cutscene when monster appears out of wall), im pretty sure you can detect whenever game request buffers with such suspicious sizes as 512x512 256x256 128 1024 and could actually request twice or quad bigger surface via reshade, or even better - scalable size which use highest value of heigh and width and looks for closes pow value (with step twice bigger than previos value - 128, 256, 512,1024,2048,4096, etc) and use it as H and W of requested buffer (for example if we have 1920 x 1080 resolution, reshade detects something 512x512, it gets 1920 and selects 2048x2048 as closest
) instead of original. almost like DSfix and DPfix and FF13 gedosato plugin does for DOF, shadows and other low res effects.

Actually you really need to implement (or borrow from gedosato source) frame dumps that allow to analyze how every frame rendered step by step and change specific sizes of buffers, or inject effects without touching HUD (just like gedosato does with hud hashes, i think it would be good idea to use its code and compatable hashes, so that hashes found by gedosato users can be already used in reshade and both communities will help each other).

But anyway, lets deal with primary problem 1st please - mesed up menues, text screen, effects.


P.S. - your forum needs tweaking, until i removed pastbing link it considered my post as spam and i barely managed to post it!
Last edit: 9 years 2 weeks ago by v00d00m4n.

Please Log in or Create an account to join the conversation.

  • crosire
More
9 years 2 weeks ago - 9 years 2 weeks ago #2 by crosire Replied by crosire on topic Silent Hill 4 messed up overlay menues & effects
I'll see if I can borrow the game somewhere and try some things.

v00d00m4n wrote: Thats kinda offtopic, but can you lower please OGL specs to at least 3.0 and request GL features of higher version only on demand if shader really needs them (you can use some heuristics and templates to tell is shader used something than needs OGL above 3)?

I am using features of OpenGL 4.3 throughout the OpenGL renderer of ReShade, so that is an absolut requirement. I might add an OpenGL 2 or 3 renderer in the future if I find the time though.

v00d00m4n wrote: Btw i suggest to look at it sourcecodes of d3d8 to improve internal wrapper.

ReShade's D3D8 wrapper is open source too btw.

v00d00m4n wrote: Actually you really need to implement frame dumps that allow to analyze how every frame rendered step by step and change specific sizes of buffers, or inject effects without touching HUD.

Something similar is planned for the future, but it won't make it into version 1.0 of ReShade.

v00d00m4n wrote: your forum needs tweaking, until i removed pastbing link it considered my post as spam and i barely managed to post it!

Yeah, I know, the heuristic antispam system still needs to learn. But I prefer a few blocked legimate posts over a ton of spam =).
Last edit: 9 years 2 weeks ago by crosire.

Please Log in or Create an account to join the conversation.

  • v00d00m4n
  • Topic Author
More
9 years 1 week ago - 9 years 1 week ago #3 by v00d00m4n Replied by v00d00m4n on topic Silent Hill 4 messed up overlay menues & effects
---, espeicially when its old game that not available in digital stores and has production of disks stopped a long ago.

If its kind of what called fair use.
Last edit: 9 years 1 week ago by crosire. Reason: Removed problematic information

Please Log in or Create an account to join the conversation.

  • v00d00m4n
  • Topic Author
More
9 years 1 week ago #4 by v00d00m4n Replied by v00d00m4n on topic Silent Hill 4 messed up overlay menues & effects
Just found this, yet another and this time open source d3d8 wrapper github.com/emoose/sh2proxy that was designed for SH2, i think it might be helpfull for you to see SH specific things and improve your own d3d8 code.
And one more with sources www.codeguru.com/cpp/g-m/directx/directx...with-a-Proxy-DLL.htm
hope it will help you help us all XD

Please Log in or Create an account to join the conversation.

  • crosire
More
9 years 1 week ago - 9 years 1 week ago #5 by crosire Replied by crosire on topic Silent Hill 4 messed up overlay menues & effects

v00d00m4n wrote: yet another and this time open source d3d8 wrapper

It's only introducing some new options to the D3D8 side (and that's not the problematic part here), no wrapping to D3D9 is done. And it's that part that messes up the overlay, I asume because some states or textures aren't converted to D3D9 properly.
Thanks anyway, may come in handy for other things in the future =).
Last edit: 9 years 1 week ago by crosire.
The following user(s) said Thank You: v00d00m4n

Please Log in or Create an account to join the conversation.

  • v00d00m4n
  • Topic Author
More
9 years 1 week ago #6 by v00d00m4n Replied by v00d00m4n on topic Silent Hill 4 messed up overlay menues & effects
No problem!
I decided not to start new thread, since its related issue - in Silent Hill 3, which fortunately has fine working menues, no depth buffer effects working, and there is some little issue with LAMPS\WINDOWS|LIGHT sources, any of them kinda leaves gray trace for few seconds whenever you move camera and in some cases there are some triangles and squares of darker color in areas of such light sources., You can see that in windows and lamps inside mall in very begining of SH3.

Also there is same issue iwth DOF having fixed 512x512 or 640x480 resolution, please do some generic solution to somehow trace such low res buffers, identify them by hashes based on size, and add something like
#define buffer_or_renderTarget_hash_customSize 4096x4096
to override default size. Gedosato and custom game fixes by same guy does this thing on individual basis, but if you will log all of such calls and will give users power to override requested size of anything, this will allow to trace and override any resolution in any game to anything.
This may help to fix low resolution of shadow and many other effects. Can you try something like this please?

Please Log in or Create an account to join the conversation.

  • Boulotaur2024
More
9 years 6 days ago - 9 years 6 days ago #7 by Boulotaur2024 Replied by Boulotaur2024 on topic Silent Hill 4 messed up overlay menues & effects
This game (Silent Hill 4) is broken as hell on PC. Just forget about it. The pcsx2 version is superior in every way (supersampling and controls)

I just re-tried this morning the PC version anyway (because I love my routines you know since I try the PC version every 2/3 years). The dx8->dx9 convertor does that messed up menus thing you describe in the OP. I even tried to debug it with Crosire's source-code but I have no idea what's going on with that off-center thing.

The game is then somewhat playable though once in-game since you no longer have to deal with menus. I can even get a depth buffer (which has inverted depth values mind you) in the first room. But it disappears after changing room lol.

Like I said this game is horribly broken. The only way of getting a better resolution than 1280x960 is to run ArtMoney (see Neogaf thread) which prevents any supersampling with GeDoSaTo (I tried hard again this morning).

On the bright side, Silent Hill 2 works fine with any kind of DX9 injector (Sweetfx, GeDoSaTo, probably Reshade)

Going to try Silent Hill 3 with Crosire's dx8->dx9 convertor if I have time.

EDIT : yeah Silent Hill 3 works super fine with Crosire's convertor. Great stuff. I remember trying and failing hard last year because the game uses ps2.0 shaders that were hard (for me at least) to converto to dx9 calls. So I'm glad it finally works. I've been able to bump the resolution up 3360x2100 with GeDoSaTo and try some HBAO on top :





I have no idea about Reshade strategy to detect and replace depth stencil surfaces but the trick here is to intercept a depth stencil surface that is equal to the resolution parameter found in the game disp.ini file (in my case 2048 since the resolution parameter is defined as 2048x2048). I should mention I actually hard coded that into GeDoSaTo as the algorithm is not smart enough to detect and set it up.

Anyway kudos to you Crosire for the work on the DX8 convertor !

EDIT : a practical example of ssao/curve before/after
Last edit: 9 years 6 days ago by Boulotaur2024.
The following user(s) said Thank You: crosire, 80T

Please Log in or Create an account to join the conversation.

  • 80T
More
8 years 8 months ago #8 by 80T Replied by 80T on topic Silent Hill 4 messed up overlay menues & effects
Is there any chance to share a basic guide for noobs like myself on how to practically achieve that ^ ^ HBAO/SSAO in SH3 ?
I've tried messing around with ENB DX8>DX9 converter 0.35 & 0.36, ReShade and GeToSaDo in various combos to no avail.
The furthest I've got was up to entering the game without crashes and navigating through Menus, but as soon as I load the actual game, I get a crash.

Please Log in or Create an account to join the conversation.

  • bageraz
More
8 years 1 week ago #9 by bageraz Replied by bageraz on topic Silent Hill 4 messed up overlay menues & effects
tried to get AO for SH3. Did you used GeDoSaTo or ReShade? Tried use ReShade but no luck to get depth buffer. DX8 converter is already applied. TQ

Please Log in or Create an account to join the conversation.

  • Boulotaur2024
More
5 years 5 months ago - 5 years 5 months ago #10 by Boulotaur2024 Replied by Boulotaur2024 on topic Silent Hill 4 messed up overlay menues & effects
Some news from Silent Hill 4 :



Now you can get Ambient occlusion in some places (the depth buffer sometimes shows up depending on... the room you are. Yes the port has always been janky)
Shaders used : qUINT shaders (MXAO, Lightroom, Bloom).

- Install Silent Hill 4: Wrapper by Nemesis and set it up according to your native monitor resolution (sh4w.ini)
- Install dgVoodoo2 a wrapper to convert DX8 calls to DX11 :



Make sure to not have MSAA here.
It was my mistake to have 8X MSAA activated in the control panel and Reshade Reshade did not seem to "know" about it (no info on the overlay nor in the logs -except cryptic Dx errors-) !

Also a lot of games converted through dgVoodoo2 have depth buffer access with this method (Hitman 1/2, Silent Hill 2, probably Silent Hill 3, Mafia...).
Great work from Crosire and Marty McFly !
Last edit: 5 years 5 months ago by Boulotaur2024.
The following user(s) said Thank You: Talley Rand

Please Log in or Create an account to join the conversation.

  • peronmls
More
5 years 3 months ago - 5 years 3 months ago #11 by peronmls Replied by peronmls on topic Silent Hill 4 messed up overlay menues & effects
Has anyone been able to get ReShade to work with Silent Hill 3 proxy that fixes Shadows, DoF, Stuttering, Resolutions etc. It comes with d3d8.dll but unfortunately when a use a wrapper it makes the proxy not work but ReShade will. I know there is a small group out there making a OpenGL version of the game called Silent Hill 3 Redux . Seems that progression has halted.

Thanks friends and SH fans.
Last edit: 5 years 3 months ago by peronmls.

Please Log in or Create an account to join the conversation.

  • Talley Rand
More
4 years 8 months ago - 4 years 8 months ago #12 by Talley Rand Replied by Talley Rand on topic Silent Hill 4 messed up overlay menues & effects

peronmls wrote: Has anyone been able to get ReShade to work with Silent Hill 3 proxy that fixes Shadows, DoF, Stuttering, Resolutions etc. It comes with d3d8.dll but unfortunately when a use a wrapper it makes the proxy not work but ReShade will. I know there is a small group out there making a OpenGL version of the game called Silent Hill 3 Redux . Seems that progression has halted.

Thanks friends and SH fans.


I'm not sure if it's possible to achieve with sh3 proxy, but if you combine sh3 widescreen fix by thirteenag which basically provides the same fixes with dgVoodoo2 wrapper (as Boulotaur2024 mentioned above) you can access depth buffer:



But be warned that It's still not flawless as you need to open reshade menu and on the dx11 tab unselect all options, cycle through texture formats until you find D24S8 and then select it as shown below:

Last edit: 4 years 8 months ago by Talley Rand.

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.