Welcome, Guest.
Username: Password: Remember me

TOPIC: Any idea on intergrate reshade in to a Source Mod

Any idea on intergrate reshade in to a Source Mod 2 months 2 weeks ago #1

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: 2 months 2 weeks ago by G33KiDoS.
The administrator has disabled public write access.

Any idea on intergrate reshade in to a Source Mod 2 months 2 weeks ago #2

"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.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: G33KiDoS

Any idea on intergrate reshade in to a Source Mod 2 months 2 weeks ago #3

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.
The administrator has disabled public write access.

Any idea on intergrate reshade in to a Source Mod 2 months 2 weeks ago #4

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).
Cheers, crosire =)
The administrator has disabled public write access.

Any idea on intergrate reshade in to a Source Mod 2 months 2 weeks ago #5

It started flickering again :(
The administrator has disabled public write access.