Any idea on intergrate reshade in to a Source Mod

  • G33KiDoS
  • Topic Author
More
4 years 10 months ago - 4 years 10 months ago #1 by G33KiDoS Any idea on intergrate reshade in to a Source Mod was created by G33KiDoS
I'm trying to get ReShade renders before the VGUI draws.

I removed the d3d9 Present hook, and manually call the on_present in the CViewRender::RenderView.
But this not works as I expected, the game started flickering. Althrough in some frames, the ReShade worked as I expected:


In other frames, the game is totally black screen or just not changed at all

Could I get any help on anyone? thanks!
Last edit: 4 years 10 months ago by G33KiDoS.

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

  • crosire
More
4 years 10 months ago #2 by crosire Replied by crosire on topic Any idea on intergrate reshade in to a Source Mod
"runtime_d3d9::on_present()" calls "update_and_render_effects()". That is where the effect rendering is happening and is the one you best move wherever you want that to happen. Most of the other logic in "on_present()" is required to run at the end of the frame.
The following user(s) said Thank You: G33KiDoS

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

  • G33KiDoS
  • Topic Author
More
4 years 10 months ago #3 by G33KiDoS Replied by G33KiDoS on topic Any idea on intergrate reshade in to a Source Mod
Thanks for you reply!

But this happens if I only call the update_and_render_effects:


I guess that could caused by the game is actually not rendering objects in that function, It just adds everything to a render queue.
What do you think about that.

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

  • crosire
More
4 years 10 months ago #4 by crosire Replied by crosire on topic Any idea on intergrate reshade in to a Source Mod
There is a bit more you need to do. Most importantly call "_app_state.capture()" before calling "update_and_render_effects()" and call "_app_state.apply_and_release()" afterwards, so that all D3D states are reset to what the engine expects. Also don't forget "_device->BeginScene()" and "_device->EndScene()" (although I think those are NOPs these days).

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

  • G33KiDoS
  • Topic Author
More
4 years 10 months ago #5 by G33KiDoS Replied by G33KiDoS on topic Any idea on intergrate reshade in to a Source Mod
It started flickering again :(

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.