- Added instance data validation
- Added general load balancer for instance processing on GPU (will move to own files later)
- Added initial GPU-side write access API for GPU scene.
- Addded specialized kernel to update primitive IDs in instances when that is the only change.
#rb graham.wihlidal
#jira UE-116671
#preflight 60c25d7b1264df0001aab80b
#ROBOMERGE-SOURCE: CL 16628528
#ROBOMERGE-BOT: (v831-16623017)
[CL 16628539 by ola olsson in ue5-main branch]
* Moved Nanite resource ID and hierarchy offset back to primitive data (indirection cost is largely noise these days, and memory savings is more important - GetInstanceData() fetches this data and stores in the pre-existing registers so all the callsites don't have to worry about it).
* Removed FNaniteInfo from FPrimitiveInfo (and the type itself) in favor of just having a 32bit per-instance hierarchy root offset. Hierarchy offset and runtime resource ID just sourced from primitive.
* Removed PrimitiveID from CPU instance data (GPU still needs it). This value was redundantly stored per-instance, and now the GPU Scene upload just blits it over from primitive when the instance data is uploaded.
* Added new virtual GetNaniteResourceInfo on FPrimitiveSceneProxy that retrieves the Nanite resource ID and hierarchy offset stored on a given primitive (needed now that FPrimitiveInstance doesn't cache a copy). The non-virtual FPrimitiveSceneProxy::IsNaniteMesh() helper is used to avoid this virtual function call for non-Nanite proxies.
* Removed deprecated and no longer referenced Nanite::FResources array on FNaniteGeometryCollectionSceneProxy
* Removed expensive per-instance checks() in a few spots
* Stubbed out upcoming per instance payload allocator offset
* Removed deprecated and never referenced non-GPUScene GetInstanceData uniform buffer path
* Significantly cleaned up and optimized a lot of ISM instance data retrieval, including avoiding unnecessary FRenderTransform <-> FMatrix conversions.
* Removed GetInstanceShaderValues API, it was inefficient and annoying to require retrieval of all parameters when often only one or two of them were ever used. In some cases even the origin was unused but .w was needed because of the per-instance random packing.
* Implemented explicit GetInstanceRandomID() accessor to fetch (under current packing) Origin.W without exposing this to the callsites
* Implemented public API for GetInstanceLightMapData(), since the internal version was only accessible by GetInstanceShaderValues()
* Renamed GetInstanceShaderCustomDataValues() -> GetInstanceCustomDataValues() for API consistency
#rb jason.nadro, krzysztof.narkowicz
[FYI] rune.stubbe, brian.karis
#ROBOMERGE-OWNER: graham.wihlidal
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 16583156
#ROBOMERGE-BOT: (v828-16531559)
#ROBOMERGE-CONFLICT from-shelf
[CL 16583193 by graham wihlidal in ue5-main branch]
Clean up atmospheric fog and have it instaciate a sky atmosphere by default instead
AtmosphericFog now inherits from SkyAtmosphere and looks vaguely similar. Serialisation is handled with a serialisation enum + ue5 version.
"ClassRedirects" could not be used because parameters are not compatible and also due to different serialisation on both component.
So instead Skyamtosphere now has a bool bIsAtmosphericFog (false by default).
AtmosphericFog component now inheriting from Skyatmosphere is setting that to true so that serialisation can be properly handled for both cases : pure Skyatmosphere or SkyAtmosphere replacing a AtmosphericFog with loading/saving. This also supports StaticLightingGUID once converted, see USkyAtmosphereComponent::Serialize.
SkyAtmosphere aerial perspective is now properly gated behind the base pass vertex shader designed for that using BASEPASS_SKYATMOSPHERE_AERIALPERSPECTIVE.
Removed all AtmosphericFog related render code.
Renamed a bunch of shader permutation.
UActorFactoryAtmosphericFog is removed so that the actor is no longer visible and instanciable from menu (existing actors in levels are still created correctly)
UAtmosphericFogComponent is made notplaceable.
ShooterGame compiled and ran succesfuly.
Colton Daniels (QA) will upate reference screneshot in a later CL.
#rb Charles.derousiers, Marc.Audy, Kevin.Ortegren
[CL 16455741 by Sebastien Hillaire in ue5-main branch]
Now, proxiess can register for needing an on added/removed from level call. If this is requested, they are added to a map, which maintains a list of primitives that need the add/remove call, per level.
The only component that currently utilizes this is the Landscape component. To facilitate it's needs, the generic flags used to determine if it should be visible have been removed from FPrimitiveSceneProxy, bRequiresVisibleLevelToRender bIsComponentLevelVisible, and replaced with bForceHidden. The landscape component will now set that flag under the same circumstances as before.
[REVIEW] [at]sebastien.lussier [at]Nick.Whiting [at]patrick.enfedaque
#jira UE-UE-114943
#lockdown nick.whiting
#ROBOMERGE-SOURCE: CL 16207473 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v796-16191650)
[CL 16207501 by brandon dawson in ue5-main branch]
- We want to skip adding geometry that will run through FRayTracingDynamicGeometryConverterCS and does not have a supported vertex factory type.
- I've moved checking the vertex factory type from the beginning of the function to happen closer to where we add primitives to the DynamicRayTracingGeometriesToUpdate list (which are the primitives that route through FRayTracingDynamicGeometryConverterCS)
- This is a follow up on CL# 15920326
#rb Yujiang.Wang
#review-15980032
#jira UE-110896
[CL 15982018 by Jason Nadro in ue5-main branch]
- This fixes a handful of crashes where ray tracing code would fail to find shaders for VF types that were not supported when we went to render.
- Added early out code in each proxy's GetDynamicRayTracingInstances() function to avoid adding ray tracing instances if we don't support the VF Type.
- I attempted to to early out of the function as early as possible.
- Since skeletal mesh sections can in theory have different vertex factories we have to check each one. The logic I've gone with is that if _any_ section uses an unsupported VF we opt out of adding any of the sections to ray trace. The result would be the whole skeletal mesh won't draw (idea being we wouldn't want partial meshes being draw).
#rb Juan.Canada
#review-15915627 @Yuriy.ODonnell, @Juan.Canada
#jira UE-110896
[CL 15920326 by Jason Nadro in ue5-main branch]
Wrap the 'min' instuction with ALLOW_STATIC_LIGHTING macro in mobile base pass pixel shader.
#jira none
#rb Dmitriy.Dyomin, Jack.Porter, Mi.Wang
[CL 15578597 by Wei Liu in ue5-main branch]