GameOverlay.Net
GameOverlay.Net copied to clipboard
Applying custom HLSL PixelShaders
Hi Michel. Thanks a lot for your work on this library. I really like it and it has been very helpful in different projects. I was wondering if you'd consider the following enhancement to the library (or if you have some pointers how to accomplish this in its current state):
-
Extend the Graphics class with a DrawShader function that applies a custom HLSL PixelShader to the whole Screen (think ReShade) or within a specified rectangle only. This would allow to render arbitrary Shader output in the overlay or distort / adjust what you see on the screen (for example making in grayscale or inverting colors).
-
Here is a little mockup of the effects I'd like to achieve with the overlay
- red rectangle: Invert the colors of what's seen below the overlay
- blue rectangle: adjust the colors of what's seen below the overlay to grayscale
- green rectangle: render some pixel shader (example taken from https://www.shadertoy.com/view/MdSXzz) and do some kind of alpha blending with what's seen below the overlay
Looks like this is totally possible but my knowledge in graphics programming is very limited and i would take a lot of time to read about all the required stuff. I don't think that I can add that myself anytime soon.
I'll drop some links which might help you/me implementing that at some point.
https://docs.microsoft.com/en-us/windows/win32/direct2d/effects-overview https://docs.microsoft.com/en-us/windows/win32/api/d2d1effectauthor/nf-d2d1effectauthor-id2d1effectcontext-loadpixelshader?redirectedfrom=MSDN https://docs.microsoft.com/en-us/windows/win32/direct2d/hlsl-helpers
@maschere do you have any updates on the topic? I would like to be able to do the same thing and haven't found a way of doing it for now.
No sorry, I haven't looked into it.