- Removing MaterialAttributeDefinitionMap and MaterialRenderProxy from MaterialShared.h
- Removing MaterialShared from Material.h
#preflight 639cbb35776b61ba3b82f03e
[CL 23541603 by christopher waters in ue5-main branch]
* Remove the need to call BuildInstanceMaskAndFlags(), BuildRayTracingInstanceMaskAndFlags() manually in GetXXRayTracingInstance(). They will be called in the renderer module. All functions manually called has been removed.
* Remove the RENDER_API public api for those functions, as they cause link error in the Engine module (where the header is included in the Engine build file for static library link. the RENDERER_API is interpreted as dllimport, which will not link the functions in RayTracingInstance.cpp) and there is no need to call them outside of renderer module.
* A callback function is added to FRayTracingInstance, use it for RaytracingInstanceMaskandFlags caching.
Note: this is a first step to separate the instance mask between RayTracing and PathTracing, where PathTracing uses a totally different instance mask. This cleanup is un-avoidable if we want to keep rendering related code in the renderer module.
#rb Yuriy.ODonnell
#jira UE-172742
#preflight 6399002f2960b732202acc7c
[CL 23514248 by tiantian xie in ue5-main branch]
On local testing, average performance of the function went from 27ms to 11ms
- Changed UVs data layout in FGeometryCollectionConstantData to be an array of UVChannels instead of an array of vertices containing each multiple channels, this reduces allocations quite a lot
- Avoid memcpy by passing array by reference to BuildMeshSections
- Use batched parallelFor for copying bone colors and UVChannels
- Rewrite indices remap to be O(N + M) instead of O(N * M)
Most of the remaining cost is in copying the arrays now
Future work could include making a copy per thread ( but may have to keep allocation on the calling thread )
#rb jimmy.andrews, brice.criswell, Bryan Sefcik
#preflight 6387971f3377450900d27163
[CL 23340834 by cedric caillaud in ue5-main branch]
- Optimize managed array collection NumElement to only fetch once from the group map
- Make sure to skip IncrementSleepTimer and ImcrementBreakTimer method is GC is not broken yet
- Early out in RefreshEmbeddedGeometry if no examplar is present
- Optimize BuildGeometry to reduce cache missed when running too small batch across large number of threads ( 2.5 time perf boost )
#rb benn.gallagher
#preflight 637531c6953c19d43519551b
[CL 23166264 by cedric caillaud in ue5-main branch]
* GeometryCollectionComponent.h - Most files are related to the removal of includes in this file. Removed 7 headers
- Moved GeometryCollectionDamagePropagationData in to its own file
- Changed COPY_ON_WRITE_ATTRIBUTE to be set in a way so implementations can be placed in cpp file.
- Moved some function implementations to cpp file
* Removed include in FieldSystemActor.h
* Removed include in FieldSystem.h
* Removed include in CommonUISettings.h
#preflight 636b325c376a9cd6a8818aae
#rb cedric.caillaud (for the actual changes, not additional includes and a couple include removals outside GeometryCollection)
[CL 23069399 by henrik karlsson in ue5-main branch]
* Split IsRayTracingEnabled() into 2 parts: IsRayTracingEnabled() which can be changed at runtime and IsRayTracingAllowed() for checking if ray tracing can be enabled.
* r.Raytracing can now have following values: 0 - disabled, 1 - enabled all the time, 2 - enabled dynamic
* When ray tracing is dynamic, RayTracingGeometryManager will collect all FRayTracingGeometry and allocate/release RHI objects as needed depending on if ray tracing is enabled or not.
* Ray tracing can be switched on/off with r.Raytracing.Enable (default is 1).
* Add support to most features used in CitySample/Lyra for switching ray tracing at runtime.
* TODO: Hair geometries are not yet released.
#rb yuriy.odonnell
#preflight 634feac68176062ea7da933f
[CL 22622885 by aleksander netzel in ue5-main branch]
- Currently disabled by default (controlled using r.RayTracing.Nanite.Mode)
- Nanite triangle data is streamed out to temporary buffers and used to build BLASes.
- For hit shaders, instead of having to keep uncompressed vertex/index buffers, nanite data is referenced using an auxiliary buffer to identify page/cluster indices.
- BLAS build:
- Whenever a new Nanite page is installed/uninstalled, a rebuild of the associated mesh BLAS is requested.
- Compute shader is dispatched to stream out mesh data to temporary buffer as well as auxiliary data used by hit shaders.
- CPU then does a readback of part of the data to determine size of the BLAS etc and kicks off a BLAS rebuild.
- Added raytracing support to Nanite Vertex Factory.
#rb rune.stubbe, yuriy.odonnell
#preflight 6331cec7b20e73a0983d9326
[CL 22203852 by tiago costa in ue5-main branch]
- When ShowBoneColors option is off display vertex color
#rb jimmy.andrews
#jira UE-163379
#preflight 6329423fb40000c8f04f0dcb
[CL 22104713 by cedric caillaud in ue5-main branch]
- crash is caused by constantData section having no triangles and causing bogus section data in the render proxy
#rb brice.criswell, jimmy.andrews, devon.penney
#jira UE-156612
#preflight 6324b5278c3def91aa9f83ef
[CL 22058495 by cedric caillaud in ue5-main branch]
Fixed include paths to be relative to the private or public folders.
Hid or removed includes that reached into other private module folders.
Updated PublicInclude paths when necessary.
#jira
#preflight 631a717cec45fbf3d74d4ba7
[CL 21916033 by bryan sefcik in ue5-main branch]
1. Move the build out of the section loop so that we add one BLAS per geometry collection.
2. Create the ray tracing geometry but delay the BLAS build later to dynamic raytracing geometry update.
#jira UE-159425
#rb yuriy.odonnell
#preflight 62d1b0da7e1c26dcd722365b
[CL 21115524 by Tiantian Xie in ue5-main branch]
+ Fix bounding box calculation issues in GeometryCollectionComponent (which caused issues w/ painting)
+ Add vertex color rendering to Geometry Collection Scene Proxy (so you can see what you're painting)
#preflight 62c5a4693c5171c8170a718c
#rb cedric.caillaud
[CL 20967543 by Jimmy Andrews in ue5-main branch]
This saves about ~40% of the cloth simulation cost.
#rb jeff.newquist
#ROBOMERGE-OWNER: evgenii.babinets
#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 20294167 via CL 20294181 via CL 20295375 via CL 20295420
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)
[CL 20305169 by evgenii babinets in ue5-main branch]
Tidy up use of FPrimitiveSceneProxy velocity getters.
Now DrawsVelocity() is only for velocity relevance.
And HasDynamicTransform() is for determining if we need to store previous transform state.
VSM caching was using PRIMITIVE_SCENE_DATA_FLAG_DRAWS_VELOCITY so replaced that with PRIMITIVE_SCENE_DATA_FLAG_SHOULD_CACHE_SHADOW which should use the old behavior and can be tweaked in future using ShouldCacheShadow().
A common pattern for determining whether to output velocity now is to check if a previous transform exists, and to OR in AlwaysHasVelocity().
I found some proxy types that don't check for previous transform.
Also I found that the debug physics aggregate types *never* check for previous transform.
These are pre-existing potential bugs for fixing in another pass.
Also I found some proxies that don't currently fill out velocity relevance.
These are pre-existing potential bugs for fixing in another pass.
#preflight 62863f789016c6dd897f1cd2
#fyi andrew.lauritzen
[CL 20279797 by Jeremy Moore in ue5-main branch]