Hook into Windows desktop
- pneumatic
- Topic Author
Also want to write my own shader that takes screen uniformity measurements from DispcalGUI to correct the colour uniformity of the screen.
I notice DXTory (or was it Fraps?) is able to overlay a FPS counter onto the desktop, so it seems to be possible in theory.
Here is a library that may offer some help
github.com/DarthTon/Xenos
Please Log in or Create an account to join the conversation.
- pneumatic
- Topic Author
I'm thinking it will not work and break something
Might have to backup my computer first and then try replacing the files in safe mode or something.
Would be so awesome if it worked 3d LUT calibration with dithering on everything, and even the future possibility of screen uniformity correction.
Please Log in or Create an account to join the conversation.
- JBeckman
(It'll break DirectX after all - or OpenGL if that's the file you were to replace. - and the DirectX runtime setup from MS only adds the supplementary files whereas these core files require a full OS reinstall to correct if dism or sfc can't restore them properly.)
Please Log in or Create an account to join the conversation.
- crosire
The desktop is not rendered via 3D acceleration, so ReShade cannot hook into it.
Please Log in or Create an account to join the conversation.
- pneumatic
- Topic Author
But crosire, are you sure about that because here it says Desktop Window Manager uses DirectX9: en.wikipedia.org/wiki/Desktop_Window_Manager
Since dwm.exe resides in /system32 I presume it uses the d3d9.dll's in there too?
And here is a video where you can see Fraps can overlay its FPS meter onto the Aero desktop which means it is somehow getting its hooks into dwm.exe .
If only there was a way to hook reshade in too!
edit: maybe it's not getting a hook, just "always on top"
Please Log in or Create an account to join the conversation.
- JBeckman
If made compatible with it the "AppInit" (I think that's what it's called.) global injection method would also work without replacing system files but it requires a very well maintained blacklist or a strict whitelisting system since you do not want ReShade to inject into every single process in Windows not to mention any other application on the system since ReShade32.dll or ReShade64.dll would otherwise always be loaded into a application as it was started.
(GeDoSaTo uses this via a whitelist only system as if it's newer versions.)
Has other drawbacks too such as potentially triggering SecureBoot functionality of modern UEFI bioses to block the injection unless disabled.
Please Log in or Create an account to join the conversation.
- NoMansReshade
Please Log in or Create an account to join the conversation.
- Martigen
Please Log in or Create an account to join the conversation.
- v00d00m4n
Please Log in or Create an account to join the conversation.
- NoMansReshade
v00d00m4n wrote: google for windows shim engine and app compat toolkit, you can re-route dwm.exe and explorer.exe to reshade dll outside of system folder.
How would we hook into it correctly, though? "dwm.exe" Uses no frameworks such as OpenGL, or DirectX.
Please Log in or Create an account to join the conversation.
- v00d00m4n
api-ms-win-dx-d3dkmt-l1-1-0.dll
I cant find much of information about it, and I cant even find this dll in windows folder, similar api-ms*.dll files has small size of 3-5 kb and it seems like it some sort of api set stub and something like symlinks references that windows re-routes to actual api components, or actuelly traces to kernel. Need to check with debugger to get better idea of how it works. There is no info on MSDN about that, looks like it one of things MS use internally and does not talk much about.
Please Log in or Create an account to join the conversation.
- v00d00m4n
btw, its quite a good idea.NoMansReshade wrote: I managed to created a dummy D3D9 Application that reshade can hook into. Working on making shaders actually show up
You can try to "catch desktop" and "render it" in borderless window on top of actual desktop, but you need to figure out how to solve "top window" problem and makes it act like it not exist or inactive, so that all of windows bellow could get input.
Please Log in or Create an account to join the conversation.
- LegoPepper
Sorry for the bump, but did you get anywhere with this?NoMansReshade wrote: I managed to created a dummy D3D9 Application that reshade can hook into. Working on making shaders actually show up
Please Log in or Create an account to join the conversation.
- Muf
Please Log in or Create an account to join the conversation.
- miwalker
EDIT: Actually, I figured out why there were so many visual glitches when attempting to use resahde on a window that was being captured onto that same window, it's simply because reshade is reshading itself infinitely. This works just like the "inception" effect of obs or any screen recording, when the display is displaying itself displaying itself...and so on. So it's sorta like stacking a million shaders over themselves, it looks like a garbled, distorted, ultra sharpened mess. Cool for random visuals though haha.
So there are two options.
1:Get a second monitor and create a display capture, fullscreen it, drag it over to your main monitor, use WindowTop to make it on top and click-through, then drag your mouse to your other monitor to use your cursor properly. It actually works. Too bad my other monitor is 1080p and my main is 1440p, so the image quality is garbage.
2: Simply use OBS's window capture function, and do the same steps as number 1. Although in this case, there appears to be quite apparent visual compression of the capture, so even though this will technically let you use reshade on a capture that is on the same screen it is capturing, it doesn't look that great tbh. Also, another drawback is that you are limited to only that window having reshade applied to it, not the whole actual desktop unlike the first option.
So in conclusion, it's not that great, but it's definitely the closest of gotten to be able to sue reshade over my desktop or non game/video applications (Firefox looked dope with some FilmicPass haha).
Please Log in or Create an account to join the conversation.
- Shady
Please Log in or Create an account to join the conversation.
- Aelius Maximus
Please Log in or Create an account to join the conversation.
- kikhyc
now I read that Aelius Maximus, NoMansReshade, or miwalker, all have some possible solutions but I couldn't find anything for someone beginner.
Also, it doesn't look like the proposed current solution (OBS) would be applied to fullscreen apps (such as games) as well, and that a second monitor is needed.
Which basically defeats the initial purpose.
I also found out some C++ functions (GetDC and Bitblt) that would allow me to do that, but same issue as stated below: it does this inception effects and won't work on same monitor...
Isn't there any other way to do that ? by doing the visual changes to the source, before displaying it + excluding the result from being considered as the source again (to avoid the inception loop)...
Thanks in advance for any help anyone can provide!
Please Log in or Create an account to join the conversation.
- Shregg
Please Log in or Create an account to join the conversation.
- dogelition
Source code, instructions and the compiled DLL can be found here .
Please Log in or Create an account to join the conversation.