advancedfx / afx-unity-interop

(Test) Sample for Unity for HLAE afx_interop (augmented CS:GO). Please note the license does not apply to sub-modules.
MIT License
6 stars 1 forks source link

Unity and CS:GO hangs when mat_queue_mode is set to 0 #2

Open xyovanz opened 4 years ago

xyovanz commented 4 years ago

Workaround

mat_queue_mode 2

Problem

As said both Unity editor and CS:GO hang with no response when mat_queue_mode is 0. Eventually both apps become responsive for one frame, leaving CS:GO console like this: image Seting mat_queue_mode to -1 solves this. Not sure about other (1 and 2).

dtugend commented 4 years ago

Thank you for the bug report.

I am not planning to fix it for the following reasons:

On multi core CPU systems the only problem is with mat_queue_mode 0, which means non-queued and non-threaded mode.

On single core CPU systems setting mat_queue_mode to 1 fixes it as well.

In general one can expect better performance with -1 on multi core systems, because the drawing and the engine thread of CS:GO are independent. The afx-unity-interop project leverages this on the Unity side as well, since it uses the LWRP, which is threaded by default too.

So I don't see any obvious advantage of using mat_queue_mode 0, apart from that it might bee required for Reshade inside CS:GO (you could try if reshade works with mat_queue_mode 1).

I will also add this to the documentation / ReadME.

dtugend commented 4 years ago

Forgot to list an important reason: You can switch the mat_queue_mode inside CS:GO while in-game, but I can't reflect that in Unity, since it would require a restart, it can not be switched while it's running.