Commit Graph

154 Commits

Author SHA1 Message Date
jeremy moore
f2fecd29dc Add support for per-bone hit proxies to geometry collection nanite scene proxies.
#rb Jimmy.Andrews
#tests Use fracture mode with nanite geometry collection to confirm that selection works.

[CL 34902727 by jeremy moore in ue5-main branch]
2024-07-18 11:42:39 -04:00
jimmy andrews
765ad95250 add simple empty light cache interface to nanite geometry collection scene proxy, since we never have baked light maps for them
#rb Jeremy.Moore

[CL 34882297 by jimmy andrews in ue5-main branch]
2024-07-17 15:46:26 -04:00
cedric caillaud
72c4876536 Geometry collection : add support for collision visualization mode ( player collision & Visibility collision )
#rb Sergio.Gardeazabal
#jira UE-218991

[CL 34841757 by cedric caillaud in ue5-main branch]
2024-07-16 11:29:59 -04:00
graham wihlidal
18f387a4e2 Nanite support for per mesh section cast shadows flag
#rb jamie.hayes
#jira UE-171477
#fyi brian.karis, rune.stubbe, andrew.lauritzen, ola.olsson

[CL 34210703 by graham wihlidal in ue5-main branch]
2024-06-07 14:58:51 -04:00
jimmy andrews
636bfbf3fc Remove bone selected material reference from UGeometryCollection, and clean up some references / accesses to it and legacy methods referring to its (now nonexistent) material ID
#rb cedric.caillaud

[CL 33836478 by jimmy andrews in ue5-main branch]
2024-05-22 13:38:07 -04:00
chris kulla
085005b226 Ray Tracing: Ensure that ReverseCulling does not depend on the matrix determinant and observe ReverseCulling where appropriate
The DXR specification states that backface culling is not affected by the transform, so there is no need to set this flag based on the transform determinant.

Additionally, update the creation of mesh batches to take into account the reverse culling flag on the primitive (when present) for consistency with the raster behavior.

#rb Krzysztof.Narkowicz

[CL 33212381 by chris kulla in ue5-main branch]
2024-04-24 16:43:23 -04:00
graham wihlidal
222d5992e1 Minor code cleanup
#jira none

[CL 32495908 by graham wihlidal in ue5-main branch]
2024-03-26 00:02:49 -04:00
jeremy moore
1aa8194ace Fix potential flicker when marking render state dirty on geometry collection component.
Issue is that geometry collection scene proxies were always created at the rest transform state, and then the current transforms were set at the first update. This would could cause a reset flicker.
Also the first update wouldn't happen if the component was at rest, so visually it would go back to the rest state and stay there.
The fix is to get the current DynamicData during scene proxy construction.
#rb cedric.caillaud
#jira UE-210150

[CL 32331095 by jeremy moore in ue5-main branch]
2024-03-19 13:29:21 -04:00
jeremy moore
6eed608ed9 Add custom depth support to nanite geometry collection.
#rb cedric.caillaud

[CL 32217974 by jeremy moore in ue5-main branch]
2024-03-13 12:44:06 -04:00
tiago costa
03f7f8f626 Call FRayTracingGeometry::IsValid() instead of just checking that RayTracingGeometryRHI is not null
[FYI] aleksander.netzel

[CL 31840561 by tiago costa in ue5-main branch]
2024-02-27 10:26:42 -05:00
steve robb
f8d47335a4 Replaced RemoveAt(N, 1, EAllowShrinking::*) with RemoveAt(N, EAllowShrinking::*).
[CL 31626444 by steve robb in ue5-main branch]
2024-02-19 16:51:58 -05:00
steve robb
f029468598 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30729174 by steve robb in ue5-main branch]
2024-01-19 16:41:35 -05:00
jeremy moore
af02947e11 Fix race condition when creating geometry collection scene proxy for nanite. Moved some state caching from the constructor, which isn't guaranteed to be called after render resources are initialized, to CreateRenderThreadResources which is.
#rb cedric.caillaud
#jira UE-202208

[CL 30211075 by jeremy moore in ue5-main branch]
2023-12-08 10:43:52 -05:00
titouan deslandes
2a57b8f063 Deprecated COPY_ON_WRITE_ATTRIBUTE and Indirect TManagedArray, removed CopyOnWriteAttributeList saving 200 bytes per GC.
Use the RestCollection to access those attributes instead.

#rb cedric.caillaud

[CL 29289224 by titouan deslandes in ue5-main branch]
2023-10-31 16:28:26 -04:00
michael lentine
d3ed2bc54f Undo //Fortnite/Release-28.00/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/... changelist 29242678
#rb none

[CL 29256090 by michael lentine in ue5-main branch]
2023-10-30 18:49:35 -04:00
titouan deslandes
bad8f30386 Deprecated COPY_ON_WRITE_ATTRIBUTE and Indirect TManagedArray, removed CopyOnWriteAttributeList saving 200 bytes per GC.
Use the RestCollection to access those attributes instead.

#rb cedric.caillaud, vincent.robert, Benn.Gallagher

[CL 29246315 by titouan deslandes in ue5-main branch]
2023-10-30 15:57:51 -04:00
ola olsson
e5f34a1d9c ISM Renderer Data refactor, phase 1.
- Removed old vertex-attribute centered buffers & useless translation code & replace with GPU-scene centric data
 - Made the instance data persistent over scene proxy re-creates.
 - Tracks per-instance data changes in the ISM & implement delta updates, remove need to call "MarkRenderStateDirty" for most instance updates
 - Added preliminary ID-based interface for ISM such that users can forego needing to match the internals (e.g., remove swap, required when using indices).
 - Unified the instance data use in the renderer (removed mix of old & new buffers and processing sites) - all code now sees orthogonalized transforms, the same as is in GPU-Scene.
 - Added FInstanceSceneDataBuffers and moved instance data buffer arrays to that from the Primitive proxy
 - Added FISMInstanceDataManager, which is responsible for tracking changes & dispatching updates. The ISMC owns one of these.
 - Instance data update tasks are async and waits are only done when needed, e.g., for GPU-scene update moving this off RT and later in the frame.
 - Added FInstanceDataSceneProxy, which is the owner of the scene data buffers and is updated by the manager by way if a shared reference with the primitive proxy.
 - Removed FPerInstanceRenderData, ISMC::PerInstanceRenderData
 - Removed FInstanceUpdateCmdBuffer
 - Lumen, GPUScene, SceneCulling, RT, DF all now retrieve data from FInstanceSceneDataBuffers rather than a mix of previous buffers. All now use the primitive-relative space.
 - Geometry Collection & Spline Mesh now manage FInstanceSceneDataBuffers, since they manipulate instance data in one way or another.
 - Mass: contained re-implementations of significant internals of ISMC, converted to ID-based interface
 - PCG: minor changes to avoid touching ISM internals.

#jira UE-191955,PLAY-11918
#rb jamie.hayes,jeremy.moore,jonathan.bard,krzysztof.narkowicz,mieszko.zielinski,julien.lheureux,zach.bethel,aleksander.netzel,yuriy.odonnell

[CL 28371398 by ola olsson in ue5-main branch]
2023-10-02 05:22:58 -04:00
zach bethel
41011faffa Fixed geometry collection to run on the scene pipe and defer dynamic data until the proxy is fully created.
[CL 28209499 by zach bethel in ue5-main branch]
2023-09-25 18:27:54 -04:00
cedric caillaud
d728613dd5 Geometry collection : fix assert to not trigger is nanite material is masked
#rb trivial
[FYI] jeremy.moore

[CL 27917845 by cedric caillaud in ue5-main branch]
2023-09-15 11:49:08 -04:00
cedric caillaud
c63cd43ce7 Geometry collection : update code to support masked materials for nanite code path
#rb jeremy.moore

[CL 27819971 by cedric caillaud in ue5-main branch]
2023-09-12 22:48:09 -04:00
zach bethel
cdb7826011 Added scene render command pipe which moves all scene commands to run asynchronously.
- Create / Destroy render thread resources is now deferred until scene update and runs async.
 - Added bConstrainToRenderThread option to FPrimitiveSceneProxy, which controls whether the scene pipe is used for proxy virtual function calls.

#rb krzysztof.narkowicz, christopher.waters

[CL 27799388 by zach bethel in ue5-main branch]
2023-09-12 13:46:57 -04:00
zach bethel
a2c7d0ff1b Refactored OnTransformChanged to take an RHI command list so that it can be moved off the render thread.
[CL 26674727 by zach bethel in ue5-main branch]
2023-07-28 11:29:43 -04:00
zach bethel
6cf24de219 Refactored CreateRenderThreadResources to use a command list.
#jira none

[CL 26273878 by zach bethel in ue5-main branch]
2023-06-27 18:31:41 -04:00
zach bethel
61a256b156 More command list conversions. Streaming buffers, vertex factories, and TUniformBufferRef.
[CL 26217320 by zach bethel in ue5-main branch]
2023-06-23 16:03:17 -04:00
zach bethel
aa1b0c680f Deprecated non-command list RHI methods.
- RHICreate{Vertex, Index, Structured}Buffer
 - RHICreate{ShaderResource, UnorderedAccess}View
 - RHIUpdateUniformBuffer
 - Various initialization / locking methods for helper buffer types in RHIUtilities.h

The goal is to continue to force resource creation through command lists to avoid surprises with moving things off the render thread.

#rb christopher.waters

[CL 26183242 by zach bethel in ue5-main branch]
2023-06-22 11:08:27 -04:00