Files
UnrealEngineUWP/Engine/Config/Android/AndroidEngine.ini
zach bethel 391eaf38cf Implemented parallel Gather Dynamic Mesh Elements (GDME) for visibility and shadows.
- Added r.ParallelGatherDynamicMeshElements to control whether the feature is enabled. When disabled, tasks are constrained to the render thread as before.
 - Added r.Visibility.DynamicMeshElements.NumTasks and r.Shadow.DynamicMeshElements.NumTasks which both default to 4. Thread contention becomes an issue at higher task counts for proxies which do a lot of uniform buffer or resource creation / updates.

Implementation Details:

The scene view visibility path typically has many dynamic elements per view, whereas there are typically more shadow views processing fewer elements each.

The main visibility path pushes dynamic primitives into a queue which is then processed by N async tasks, each with its own mesh collector and global vertex / index buffer. If a scene proxy is marked as not supporting parallel GDME, it is processed instead on the render thread in parallel with other async tasks. Niagara is currently the only proxy which is marked as unsupported by parallel GDME, as it has many potential sync points that would need to be untangled. When the async tasks complete, the task contexts are merged back to the view in an async task prior to launching dynamic mesh passes. Another important detail is that all material and GPU scene ops are deferred by the mesh collector and finalized at the end on the render thread. Deferring materials is necessary to allow the VT update task to overlap with GDME. The GPU scene updates are not thread safe and must be deferred.

The shadow path instead creates a queue of FProjectedShadowInfo's which is processed in parallel by async gather tasks (each with its own collector context). If a particular shadow has proxies that do not support parallel GDME, then a second pass is done over that FProjectedShadowInfo on the render thread to process the render thread only proxies. The dynamic mesh passes are launched asynchronously as well and are waited on by the shadow depth rendering passes later in the frame.

#rb krzysztof.narkowicz, christopher.waters

[CL 29289633 by zach bethel in ue5-main branch]
2023-10-31 16:36:46 -04:00

121 lines
3.8 KiB
INI

[/Script/Engine.Engine]
; DefaultBloomKernel is not used on mobile
DefaultBloomKernelTextureName=/Engine/EngineResources/DefaultTexture.DefaultTexture
; Default film grain is not used on mobile
DefaultFilmGrainTextureName=""
[PlatformCrypto]
PlatformRequiresDataCrypto=True
PakSigningRequired=False
[/Script/Engine.GarbageCollectionSettings]
gc.MaxObjectsInGame=131072
[Audio]
PlatformFormat=OGG
PlatformStreamingFormat=OGG
; Defining below allows switching to audio mixer using -audiomixer commandline
AudioMixerModuleName=AudioMixerAndroid
; Defines a platform-specific volume headroom (in dB) for audio to provide better platform consistency with respect to volume levels.
PlatformHeadroomDB=-6
[PlatformMemoryBuckets]
LargestMemoryBucket_MinGB=8
LargerMemoryBucket_MinGB=6
DefaultMemoryBucket_MinGB=4
SmallerMemoryBucket_MinGB=3
; for now, we require 3gb
SmallestMemoryBucket_MinGB=3
[DeviceProfileManager]
DeviceProfileSelectionModule="AndroidDeviceProfileSelectorRuntime"
PreviewDeviceProfileSelectionModule="AndroidDeviceProfileSelector"
[Advertising]
DefaultProviderName=AndroidAdvertising
[SlateRenderer]
NumPreallocatedVertices=200
[/Script/TcpMessaging.TcpMessagingSettings]
EnableTransport=True
ListenEndpoint=127.0.0.1:6666
!ConnectToEndpoints=CLEAR_ARRAY
ConnectionRetryDelay=0
[LocalNotification]
DefaultPlatformService=AndroidLocalNotification
[DeviceScreenDensity]
+Devices=(Model="Nexus 5",Density=445)
+Devices=(Model="Nexus 5X",Density=424)
+Devices=(Model="Nexus 6",Density=493)
+Devices=(Model="Nexus 6P",Density=518)
+Devices=(Model="SM-G930.+",Density=577,IsRegex=true) ; Samsung Galaxy S7
+Devices=(Model="SM-G935.+",Density=534,IsRegex=true) ; Samsung Galaxy S7 Edge
+Devices=(Model="SM-N920.+",Density=515,IsRegex=true) ; Samsung Galaxy Note 5
+Devices=(Model="Pixel",Density=441)
+Devices=(Model="Pixel C",Density=308)
+Devices=(Model="Pixel XL",Density=534)
+Devices=(Model="HTC 10",Density=564)
+Devices=(Model="EVA-L09",Density=423) ; Huawei P9
+Devices=(Model="A063", Density=420) ; Nothing Phone
;GalaxyS5=432
;GalaxyS6=577
[ConsoleVariables]
Slate.CacheRenderData=0
r.VSync=1
r.ParallelShadows=0
; high priority thread tasks can be downgraded to normal priority if a task is created with EPowerSavingEligibility::Eligible.
TaskGraph.EnablePowerSavingThreadPriorityReduction=1
; prefer D24_S8 for depth/stencil
r.Vulkan.Depth24Bit=1
;GalaxyS6Edge=577
r.Shadow.ForceSerialSingleRenderPass=1
; Support Mali 64k texel buffer limitation, tuned for 1080p. If you target 2k-4k resolutions please also set the LightGridPixelSize to 128
r.Forward.LightGridSizeZ = 8
r.Forward.MaxCulledLightsPerCell = 8
r.HairStrands.Simulation=0
r.HairStrands.Strands=0
r.HairStrands.Binding=0
; R11G11B10 UAV is not supported on Android
r.TemporalAA.R11G11B10History=0
; Do not backtrace vulkan memory allocations
r.Vulkan.MemoryBacktrace=0
[/Script/Engine.RendererSettings]
r.DistanceFields=1
r.TemporalAA.Mobile.UseCompute=0
r.Substrate.RoughDiffuse=0
r.Substrate.ShadingQuality=2
r.Substrate.TileCoord8bits=1
r.Substrate.SheenQuality=2
r.Substrate.Glints=0
r.Substrate.SpecularProfile=0
r.Substrate.ClosuresPerPixel=1
; Enable GPU culling for landscape
landscape.SupportGPUCulling=1
; Disables parallel GDME by default due to not enough threads
r.Visibility.DynamicMeshElements.Parallel=0
[AlternateTextureCompression]
;disabling TextureCompressionFormat for Android/IOS no longer needed
;TextureCompressionFormat=""
;TextureFormatPrefix=""
[SystemSettings]
;Perplatform to PerQualityLevel conversion mapping for platform groups
QualityLevelMapping="low"
;Manual range settings for Niagara quality levels. Simplifies handling of device profiles/fragments and what quality levels they can set.
;Please ensure device profiles or fragments for this platform do not set fx.Niagara.QualityLevel values outside of this range
fx.Niagara.QualityLevel.Min=0
fx.Niagara.QualityLevel.Max=1