You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Improves various situations around instanced geometry (commonly foliage) getting transitioned to dynamic caching and never going back - Improves performance in scenes with heavy foliage using WPO animation and WPO distance disable - Support disabling WPO animation in clipmaps past a certain point (based on the WPO disable distance). Works even when caching/static caching is disabled as it can still be a good performance tool. - Add cvar for greedy clipmap level selection; disabled by default. While this is a behavior change it addresses some old issues around coarse pages getting greedily chosen at certain angles, and also makes the behavior around the new WPO distance disable more predictable - Invalidate instances when the evaluate WPO/WPO distance changes - Invalidate clipmaps when the resolution changes enough that it would trigger different clipmap levels to enable/disable animation. This can be caused by resolution or FOV changes. While it's possible for dynamic resolution to trigger this, TBD whether it's a practical issue for it to happen occasionally. If need be we could add some hysteresis but it would also add additional tracking and complexity and just move when we have to invalidate anyways. Few other misc fixes and improvements. #jira UE-197817 #rb ola.olsson [CL 30273485 by andrew lauritzen in ue5-main branch]
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "../Common.ush"
|
|
#include "VirtualShadowMapStats.ush"
|
|
#include "/Engine/Shared/NaniteDefinitions.h"
|
|
|
|
StructuredBuffer<uint> InStatsBuffer;
|
|
RWBuffer<uint> AccumulatedStatsBufferOut;
|
|
uint NumStats;
|
|
|
|
// Pull out a bunch of nanite stats for our CSV as well
|
|
StructuredBuffer<FNaniteStats> NaniteStatsBuffer;
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void CopyStatsCS()
|
|
{
|
|
uint Index;
|
|
InterlockedAdd(AccumulatedStatsBufferOut[0], 1, Index);
|
|
if (Index < MAX_STAT_FRAMES)
|
|
{
|
|
uint Offset = 1 + Index * NumStats;
|
|
for (uint StatInd = 0; StatInd < NumStats; ++StatInd)
|
|
{
|
|
AccumulatedStatsBufferOut[Offset + StatInd] = InStatsBuffer[StatInd];
|
|
}
|
|
|
|
// Grab a few nanite stats
|
|
FNaniteStats NaniteStats = NaniteStatsBuffer[0];
|
|
AccumulatedStatsBufferOut[Offset + VSM_STAT_NANITE_TRIANGLES] = NaniteStats.NumTris;
|
|
AccumulatedStatsBufferOut[Offset + VSM_STAT_NANITE_INSTANCES_MAIN] = NaniteStats.NumMainInstancesPostCull;
|
|
AccumulatedStatsBufferOut[Offset + VSM_STAT_NANITE_INSTANCES_POST] = NaniteStats.NumPostInstancesPostCull;
|
|
}
|
|
}
|