reshade_overlay event vs reshader_present event vs register_overlay

  • MajorPainTheCactus
  • Topic Author
More
1 year 9 months ago #1 by MajorPainTheCactus reshade_overlay event vs reshader_present event vs register_overlay was created 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.

  • crosire
More
1 year 9 months ago - 1 year 9 months ago #2 by crosire Replied by crosire on topic reshade_overlay event vs reshader_present event vs register_overlay
  • "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 year 9 months ago by crosire.

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

  • MajorPainTheCactus
  • Topic Author
More
1 year 9 months ago #3 by MajorPainTheCactus Replied by MajorPainTheCactus on topic reshade_overlay event vs reshader_present event vs register_overlay
Perfect! Thank you so much for this - makes sense.

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

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.