-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
Application crosstalk feature #200
Conversation
-centralize changes -add all other resource indexes to replacement sequence -general clean up
I'm actually currently working on a add-on API for ReShade, which would allow other mods to communicate with ReShade and even change game's rendering behavior through ReShade. This has not been pushed to GitHub yet though, but can do so soon for feedback. The "official" solution to provide custom textures to shaders is using semantics:
|
Good to hear that.
lines with
And this will work with following up API, without changes in shaders? |
Probably, yes. |
to make shaders somewhat forward compatible
-crosstalk patch diff & discussions here crosire/reshade#200 -ui bypass will work with latest build of d912pxy and reshade_compat iframe mod (enabled in config) when any form of postprocessing is disabled in game
Can you open your modified reshade source code so that I can do Chinese localization? |
this avoids crash when supplied texture changes
Closing this since it can be achieved with the add-on system now: // Somewhere in Gw2Hook:
#include <reshade.hpp>
...
ID3D12Resource *gColorRes = ...;
ID3D12Resource *gGBuf0Res = ...;
reshade::api::resource_view g_color_srv = {};
reshade::api::resource_view g_gbuf0_srv = {};
...
if (reshade::register_addon(hModule)) {
// ReShade is loaded and we successfully registered us as an add-on
// Register callback that is executed every time ReShade reloads effects to update textures
reshade::register_event<reshade::addon_event::reloaded_effects>(
[](reshade::api::effect_runtime *runtime) {
reshade::api::device *const device = runtime->get_device();
// Create resource views for the D3D12 resources (the "reshade::api::resource" handle passed into the first argument is just a "D3D12Resource" pointer in D3D12, so can use it directly)
// If you already have a view descriptor (D3D12_CPU_DESCRIPTOR_HANDLE) for these resources, can skip this and pass those into "update_texture_bindings" directly (the "reshade::api::resource_view" handle is a typedef for D3D12_CPU_DESCRIPTOR_HANDLE in D3D12).
if (g_color_srv == 0 && !device->create_resource_view({ reinterpret_cast<uint64_t>(gColorRes) }, reshade::api::resource_usage::shader_resource, reshade::api::resource_view_desc(...), &g_color_srv))
return;
if (g_gbuf0_srv == 0 && !device->create_resource_view({ reinterpret_cast<uint64_t>(gGBuf0Res) }, reshade::api::resource_usage::shader_resource, reshade::api::resource_view_desc(...), &g_gbuf0_srv))
return;
// Pass resource views to ReShade effect runtime and bind it to all textures with the provided semantic name
runtime->update_texture_bindings("CROSSTALK_COLOR", g_color_srv);
runtime->update_texture_bindings("CROSSTALK_GBUF_0", g_gbuf0_srv);
...
});
} |
Hi. I want to add an ability to supply data to reshade from games/mods.
For example supplying depth buffer without heuristics or 3d scene without UI
by reshade independent code i.e. without specific forks.
(real story behind that is various requests from Guild Wars 2 community to make a modern
version of https://github.com/04348/Gw2Hook and also some other requests)
I did make some hacky implementation for dx12, that uses command list SetPrivateData
function to supply needed data using magic guid and data checks.
Supplied data is later used on effect reload to replace texture resources with specific names.
General idea works, but it will be nice to hear
some comments about that, before making more changes.