inject fx before hud to avoid blurry text

  • Posts: 12
2 weeks 4 days ago #1 by henrichsmith
I ve read many post on this argument on the forum, I ve read devs idea on that but I want to ask some questions
I build reshade from code and made some changes that inject the fx on a rendertarget that has no hud, in this way there are no artifacts in gui.
The code works only for a specific game, I ve debugged the game and find the hash of gui shader in order to find the moment to inject.
This very common and I think many people do the same
I would like to summarize and listen if I do something wrong or something could be done better

the main function is update_and_render_effects called in on_present
when I removed it from onpresent and called from trigger point no effect shows in reshade gui
so i removed only the rendertecnique part.

I made a copy of the original update_and_render_effects function passing it the current rendertarget in the injection moment

I would like to know if it's better completely remove effects part from update_and_render_effects (called from trigger point)

If someone has suggestions or used another approach I'm very interested
thanks
regards
The following user(s) said Thank You: AlucardDH

Please Log in or Create an account to join the conversation.

  • Posts: 3748
1 week 2 days ago #2 by crosire
The original idea behind "update_and_render_effects" was for that function to be able to be called from somewhere else during the frame. But it doesn't account for using the right render target (instead of the backbuffer like done at the end of the frame). So that part has to be implemented. But with that in place it should work to use it without having to introduce another function to render effects.

Please Log in or Create an account to join the conversation.

  • Posts: 12
1 week 1 day ago #3 by henrichsmith
ok thanks for the answer, I look a little bit into the code and I understand a little of the main idea, all things works for me but my idea was to create an easy way to make it more general, in a way that can be used for a lot of games with minimal changes.
But Im realizing that the main difficulties are tied to the differencies in each game, for example I ve done several research in game pipeline to find rt changes and make it work, so I think that general purpose code can't be created, it will require in any case a lot of work for targeting a specific game.
thanks
regards

Please Log in or Create an account to join the conversation.