Silent Hill 4 messed up overlay menues & effects
- v00d00m4n
- Topic Author
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!
Please Log in or Create an account to join the conversation.
- crosire
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: 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)?
ReShade's D3D8 wrapper is open source too btw.v00d00m4n wrote: Btw i suggest to look at it sourcecodes of d3d8 to improve internal wrapper.
Something similar is planned for the future, but it won't make it into version 1.0 of ReShade.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.
Yeah, I know, the heuristic antispam system still needs to learn. But I prefer a few blocked legimate posts over a ton of spam .v00d00m4n wrote: your forum needs tweaking, until i removed pastbing link it considered my post as spam and i barely managed to post it!
Please Log in or Create an account to join the conversation.
- v00d00m4n
- Topic Author
If its kind of what called fair use.
Please Log in or Create an account to join the conversation.
- v00d00m4n
- Topic Author
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
Please Log in or Create an account to join the conversation.
- crosire
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.v00d00m4n wrote: yet another and this time open source d3d8 wrapper
Thanks anyway, may come in handy for other things in the future .
Please Log in or Create an account to join the conversation.
- v00d00m4n
- Topic Author
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
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
Please Log in or Create an account to join the conversation.
- 80T
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
Please Log in or Create an account to join the conversation.
- Boulotaur2024
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 !
Please Log in or Create an account to join the conversation.
- peronmls
Thanks friends and SH fans.
Please Log in or Create an account to join the conversation.
- Talley Rand
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:
Please Log in or Create an account to join the conversation.