From bd2e8c111b501eb721ddb067470e14a20cab935c Mon Sep 17 00:00:00 2001 From: BlueRose <378100977@qq.com> Date: Thu, 15 Aug 2024 15:05:30 +0800 Subject: [PATCH] vault backup: 2024-08-15 15:05:30 --- .../性能优化/UnrealInsight以及其他性能监测工具.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/03-UnrealEngine/性能优化/UnrealInsight以及其他性能监测工具.md b/03-UnrealEngine/性能优化/UnrealInsight以及其他性能监测工具.md index e4f5f7e..6f44e5c 100644 --- a/03-UnrealEngine/性能优化/UnrealInsight以及其他性能监测工具.md +++ b/03-UnrealEngine/性能优化/UnrealInsight以及其他性能监测工具.md @@ -171,6 +171,20 @@ Game Thread 造成的开销,基本可以归因于 C++ 和蓝图的逻辑处理 ### LandscapeSubsystem Tick 主要是在更新Grass。在非编辑器下的 Game 模式,可以通过 Console Variable `grass.TickInterval` 来设置更新间隔,其数值会被 clamp 在 1 到 60 之间。 +UE5.2 LandscapeGrass.cpp +```c++ +static void GrassCVarSinkFunction() +{ + static float CachedGrassDensityScale = 1.0f; + float GrassDensityScale = GGrassDensityScale; + + if (FApp::IsGame()) + { ALandscapeProxy::SetGrassUpdateInterval(FMath::Clamp(GGrassTickInterval, 1, 60)); + } +... +} +``` + ### Draw Thread (Rendering Thread) Draw Thread 的主要开销来源于 **Visibility Culling** 和 **Draw Call**。