Client: Add shader precache fix for dlights/rtlights, this should eliminate the first shot of any game causing any stuttering
This commit is contained in:
parent
f0dcdc28c5
commit
a36694d1f8
2 changed files with 7 additions and 0 deletions
|
@ -96,6 +96,8 @@
|
|||
#define PRINT_HIGH 2
|
||||
#define PRINT_CHAT 3
|
||||
|
||||
var bool g_dlight_cached = false;
|
||||
|
||||
const float MASK_GLOWS = 16;
|
||||
var bool g_focus;
|
||||
bool Util_IsFocused(void);
|
||||
|
|
|
@ -291,6 +291,11 @@ CSQC_UpdateView(float w, float h, float focus)
|
|||
else
|
||||
g_view.SetViewMode(VIEWMODE_FPS);
|
||||
|
||||
if (g_dlight_cached == false) {
|
||||
g_dlight_cached = true;
|
||||
dynamiclight_add(g_view.GetCameraOrigin(), 16, [0.1,0.1,0.1]);
|
||||
}
|
||||
|
||||
g_view.UpdateView();
|
||||
|
||||
/* 2D calls happen here, after rendering is done */
|
||||
|
|
Loading…
Reference in a new issue