HDR: Override the swapchain?
- MajorPainTheCactus
- Topic Author
Less
More
2 years 1 day ago - 2 years 1 day ago #1
by MajorPainTheCactus
HDR: Override the swapchain? was created by MajorPainTheCactus
Hi I'm new to Reshade and am trying to figure out how to port a HDR shader of mine from RetroArch to Reshade.
Essentially when I find a SDR output game is using a RGBA8 swapchain I'd like to override it with Reshade to use a HDR swapchain say R10G10B10A2 and set the accompanying metadata.
Then my shader will just do a simple reverse Reinhard tonemap and conversion to HDR10 colour space (I can take care of this part).
So is this possible with Reshade? I note a lot of comments about Special K doing it but I'm not sure of the relationship between the two. Effectively I want to do a poor man's AutoHDR. This isn't my direct goal just to add.
Anyway is this possible with Reshade i.e can I just set my techniques last pass's rendertarget to a R10B10G10A2 texture format and I'm good to go?
Essentially when I find a SDR output game is using a RGBA8 swapchain I'd like to override it with Reshade to use a HDR swapchain say R10G10B10A2 and set the accompanying metadata.
Then my shader will just do a simple reverse Reinhard tonemap and conversion to HDR10 colour space (I can take care of this part).
So is this possible with Reshade? I note a lot of comments about Special K doing it but I'm not sure of the relationship between the two. Effectively I want to do a poor man's AutoHDR. This isn't my direct goal just to add.
Anyway is this possible with Reshade i.e can I just set my techniques last pass's rendertarget to a R10B10G10A2 texture format and I'm good to go?
Last edit: 2 years 1 day ago by MajorPainTheCactus. Reason: missed HDR10 colour space conversion
Please Log in or Create an account to join the conversation.
In theory, with the new plugin architecture, maybe - you'll have to write some C++. In practice it won't be easy and may need per-game tweaking to work. The game will have a whole chain of shaders that might need modifying. I think R16G16B16A16 be easier than R10G10B10A2 (the game might be using that 8bit A channel for somethign internally).
github.com/crosire/reshade/tree/main/examples
github.com/crosire/reshade/tree/main/examples
Please Log in or Create an account to join the conversation.
- MajorPainTheCactus
- Topic Author
Less
More
2 years 1 day ago #3
by MajorPainTheCactus
Replied by MajorPainTheCactus on topic HDR: Override the swapchain?
Great stuff thanks, so I guess it's not available out of the box. I'll have a look at adding it either as an add on or directly in Reshade itself. I'll start with the add-on functionality to see if it's possible before resorting to messing directly with the core.
Please Log in or Create an account to join the conversation.
- MajorPainTheCactus
- Topic Author
Less
More
2 years 1 day ago #4
by MajorPainTheCactus
Replied by MajorPainTheCactus on topic HDR: Override the swapchain?
Just to say the add-on functionality looks like it's got everything I need. I've created the DLL and done a lot of the stuff I wanted so I'm all good to go.
One question can you get a .FX or .ini file to load an add-on automatically? I want the .addon in the same directory as the FX file and presets to be loaded and the user not have to set that up separately.
One question can you get a .FX or .ini file to load an add-on automatically? I want the .addon in the same directory as the FX file and presets to be loaded and the user not have to set that up separately.
Please Log in or Create an account to join the conversation.
I don't think so. You could do anything from the dll though so that could load or enable the .fx file.
Please Log in or Create an account to join the conversation.
- lopezmason
Less
More
That's right. We can try we become what we beholdI don't think so. You could do anything from the dll though so that could load or enable the .fx file.
Please Log in or Create an account to join the conversation.