Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply librashader to any game/executable #15

Open
user18081972 opened this issue Mar 7, 2023 · 7 comments
Open

Apply librashader to any game/executable #15

user18081972 opened this issue Mar 7, 2023 · 7 comments
Labels
enhancement New feature or request notinscope Not in scope

Comments

@user18081972
Copy link

Would it be possible to have librashader just apply to any game? For example I would like to use some librashaders with FF7 steam edition, the PC port of the classic PS1 game.

Could it just take the final output of my monitor as its input to apply the shader to?

@chyyran chyyran added enhancement New feature or request notinscope Not in scope labels Mar 8, 2023
@chyyran
Copy link
Member

chyyran commented Mar 8, 2023

It's possible but that is not in scope for librashader. You would have to hook the swapchain of the game, fetch the rendered frame, and draw it back to the swapchain after applying the shader with librashader.

@ghost
Copy link

ghost commented Jan 1, 2024

That would be a job for a ReShade fork. It already does an excellent job of hooking the needed render targets, swapchains, etc. All that needs to be gutted is its custom shader compiler (yes, Reshade has its own dedicated/homebrew shader compiler/lexer/SPIRV emitter/etc)

@chyyran
Copy link
Member

chyyran commented Feb 19, 2024

Likely don’t even need a ReShade fork, can likely be done with a ReShade addon that just selects for the correct runtime and draws before present.

@Quackdoc
Copy link

Could it be possible to implement this as a vulkan layer? I realize it's not "any game" but at the very least, it does open up a lot of games Vulkan native games, DXVK/VKD3D, On linux it can support opengl via zink (and windows too, but to a somewhat buggier extent).

It wouldn't have quite the same level of support that reshade does for windows users (due to some Anti viruss not liking dxvk/vkd3d), but it would much better support linux. I know there are a couple crates/templates for creating vulkan layers on rust, but I don't know much about that.

For linux game/app support would be really high, quite possibly the vast majority of games, and if it was compatible with gamescope, it would be almost all apps since gamescope supports pretty much most x11 apps.

@chyyran
Copy link
Member

chyyran commented Mar 28, 2024

Yeah it would be possible to implement this as a vulkan layer, but that would not be something to be done at the librashader level, but at a layer above by something that consumes librashader as a crate.

I have a POC of a Vulkan layer in Rust at snowflake-ingame.

@ChthonVII
Copy link

I strongly second Quackdoc's idea to incorporate with gamescope. That would pretty much be the be-all, end-all for linux retro gaming.

@chyyran
Copy link
Member

chyyran commented Sep 7, 2024

While I would love to see librashader in gamescope, that's up to Valve if they ever want to incorporate it. The header libraries are license-compatible with BSD2, on Linux dynamic linking is the default anyways.

@chyyran chyyran pinned this issue Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request notinscope Not in scope
Projects
None yet
Development

No branches or pull requests

4 participants