ValveSoftware / gamescope

SteamOS session compositing window manager
Other
2.84k stars 189 forks source link

Reshade support™ #958

Open pchome opened 9 months ago

pchome commented 9 months ago

Well, technically it's GNU/Linux ReShade FX support. Not ReShade itself.

This is a generic post-processing injector for games and video software. It exposes an automated way to access both frame color and depth information and a custom shader language called ReShade FX to write effects like ambient occlusion, depth of field, color correction and more which work everywhere.

While readme here says it's Reshade effects people all over the internet seems confused a bit. Maybe add some clarifications.

If I understand this correctly: gamescope now have built-in ReShade FX compiler, which translates reshade shaders into spirv shaders which then used by gamescope in similar way as its fsr, blur, etc.

parkerlreed commented 9 months ago

What's the clarification here?

Gamescope supports a subset of Reshade effects/shaders using the --reshade-effect [path] and --reshade-technique-idx [idx] command line parameters.

They are already saying this is for the individual effects/shaders and not the entirety of Reshade.

pchome commented 9 months ago

At least the title of subsection in readme. I'd replace every reshade mentioning with ReShade FX shaders. Similar to well known GLSL shaders, SPIR-V shaders, HLSL shaders, etc.

p.s. SPIR-V is a simple binary intermediate language for graphical shaders and compute kernels. OpenGL Shading Language (GLSL) is a high-level shading language with a syntax based on the C programming language. ...

Also, may be worth creating repo and write shaders specifically for gamescope, which will work 100%. Because using existing ReShade repos it's 50/50 (depth buffer, multi-techniques, weird defaults, hlsl-oriented, etc.).

wheaney commented 9 months ago

@pchome Are there any reshade shaders that are using GLSL, etc...? I think they would all be using Reshade FX.

pchome commented 9 months ago

@wheaney I don't know much about reshade shaders. ReShade FX shading language

The ReShade FX shading language is heavily based on the DX9-style HLSL syntax, with a few extensions.

List of known shader repositories

yaomtc commented 6 months ago

Does Gamescope have depth buffer access?

parkerlreed commented 6 months ago

Not currently. Think of Gamescope like a layer of glass and you are painting on that glass.

It does not have any access to the game's rendering buffers.

KyunLFA commented 1 month ago

@Joshua-Ashton Is depth buffer access support for Reshade in the cards for Gamescope? As long as enabling it comes behind a command-line flag and it warns people it can lead to bans and cheat-detection, I think it would be a great feature. Would love for things like SSRTGI (or Pascal Glitcher's RTGI) to be functional for Linux native games through Gamescope...

Joshua-Ashton commented 1 month ago

It's not really possible to do, games don't submit depth work with their swapchain, and unpicking all of that is like a mountain of work that I don't really want to deal with.

KyunLFA commented 1 month ago

I see, thanks for answering anyway. I'm working on my own solution anyway (currently modifying vkBasalt a bit).