Welcome, Guest.
Username: Password: Remember me

TOPIC: Silent Hill 4 messed up overlay menues & effects

Silent Hill 4 messed up overlay menues & effects 1 year 7 months ago #1

  • v00d00m4n
  • v00d00m4n's Avatar
  • Offline
  • Posts: 44
  • Thank you received: 3
Reshade 0.17.1 here.

Tried as d3d8 - and got this mess:






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: 1 year 7 months ago by v00d00m4n.
The administrator has disabled public write access.

Silent Hill 4 messed up overlay menues & effects 1 year 7 months ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2437
  • Thank you received: 1384
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 =).
Cheers, crosire =)
Last Edit: 1 year 7 months ago by crosire.
The administrator has disabled public write access.

Silent Hill 4 messed up overlay menues & effects 1 year 7 months ago #3

  • v00d00m4n
  • v00d00m4n's Avatar
  • Offline
  • Posts: 44
  • Thank you received: 3
---, 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: 1 year 7 months ago by crosire. Reason: Removed problematic information
The administrator has disabled public write access.

Silent Hill 4 messed up overlay menues & effects 1 year 7 months ago #4

  • v00d00m4n
  • v00d00m4n's Avatar
  • Offline
  • Posts: 44
  • Thank you received: 3
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
The administrator has disabled public write access.

Silent Hill 4 messed up overlay menues & effects 1 year 7 months ago #5

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2437
  • Thank you received: 1384
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 =).
Cheers, crosire =)
Last Edit: 1 year 7 months ago by crosire.
The administrator has disabled public write access.
The following user(s) said Thank You: v00d00m4n

Silent Hill 4 messed up overlay menues & effects 1 year 7 months ago #6

  • v00d00m4n
  • v00d00m4n's Avatar
  • Offline
  • Posts: 44
  • Thank you received: 3
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?
The administrator has disabled public write access.

Silent Hill 4 messed up overlay menues & effects 1 year 7 months ago #7

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: 1 year 7 months ago by Boulotaur2024.
The administrator has disabled public write access.
The following user(s) said Thank You: crosire, 80T

Silent Hill 4 messed up overlay menues & effects 1 year 4 months ago #8

  • 80T
  • 80T's Avatar
  • Offline
  • Posts: 5
  • Thank you received: 1
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.
The administrator has disabled public write access.

Silent Hill 4 messed up overlay menues & effects 7 months 3 weeks ago #9

  • bageraz
  • bageraz's Avatar
  • Offline
  • Posts: 2
  • Thank you received: 1
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
The administrator has disabled public write access.