reshade_overlay event vs reshader_present event vs register_overlay

  • MajorPainTheCactus
  • MajorPainTheCactus's Avatar Topic Author
  • Offline
More
1 month 2 weeks ago #1 by MajorPainTheCactus
Hi can someone explain the differences between the reshade_overlay event, reshader_present event and register_overlay?  When should I use one over another and what functionality does each provide?  I cant seem to find much information on them.

Many thanks.

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

More
1 month 2 weeks ago - 1 month 2 weeks ago #2 by crosire
  • "reshade_present" is called after ReShade has rendered everything to the swap chain back buffer (effects and GUI). This can be used if you need to do something on the swap chain after ReShade is finished (effectively the sibling of the "present" event, which is called before ReShade does anything). The OBS example uses it to copy the swap chain for example, so that OBS receives the image with effects applied.
  • "reshade_overlay" is called while ReShade is building the GUI. This can be used to add custom ImGui windows to the screen, that act fully independent of the ReShade overlay. But registering for this event means ReShade cannot disable ImGui rendering while the ReShade overlay is invisible, so adds some permanent overhead that ReShade can otherwise avoid. And it's not supported in VR. As such it's better to avoid using this and use the "register_overlay" functionality instead.
  • "register_overlay" registers a callback with ReShade that is called while ReShade is building the GUI. The difference being however that it is only called while the ReShade overlay is visible (except when registering for "OSD"). It can also be used to extend existing windows that ReShade or other add-ons already registered (e.g. append widgets to the statistics tab by registering for "Statistics"). And these overlays are shows in VR as well. In contrast to "reshade_overlay", where you have full control and create windows yourself, with "register_overlay" the callback is called with the window already created, so can just add widgets directly ("ImGui::Button()", ...) without first calling "ImGui::Begin()" and later "ImGui::End()" (ReShade already does that behind the scenes). Plus there is the special case when registering for nullptr, which can be used to add settings widgets for the add-on on the add-on page.
Last edit: 1 month 2 weeks ago by crosire.

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

  • MajorPainTheCactus
  • MajorPainTheCactus's Avatar Topic Author
  • Offline
More
1 month 1 week ago #3 by MajorPainTheCactus
Perfect! Thank you so much for this - makes sense.

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