- Issue 1 - UStaticMesh can be released before the proxy is destroyed:
- delay release of FRayTracingGeometryGroup until all proxies are unregistered.
- keep copy of RayTracingGeometryGroupHandle in render proxy
- Issue 2 - FRayTracingGeometryManager::RequestUpdateCachedRenderState(...) called when running !IsRayTracingAllowed()
- initialize RayTracingGeometryGroupHandle to INDEX_NONE
- only call FRayTracingGeometryManager::RequestUpdateCachedRenderState(...) if IsRayTracingAllowed()
[Original CL Desc]
Improvements to tracking of proxies requiring invalidation when raytracing geometry is streamed/built/made resident.
Context:
- The existing CachedRayTracingStateProxiesMap mapped [UStaticMesh -> Array of Proxies that need to be invalidated], however there was no way to map [FRayTracingGeometry -> Array of Proxies that need to be invalidated] since FRayTracingGeometry doesn't have a pointer to which UStaticMesh owns it. On top of that, not every FRayTracingGeometry is associated with a UStaticMesh.
- An alternative approach could be having a map [FRayTracingGeometry -> Array of Proxies that need to be invalidated] however that would require significantly more memory - O(#proxies x #LODs) instead of O(#proxies).
Change:
- Modified CachedRayTracingStateProxiesMap to use a more generic RayTracing::GeometryGroupHandle (int32) as key.
- Store RayTracing::GeometryGroupHandle in FRayTracingGeometry.
[FYI] aleksander.netzel
[CL 31210259 by tiago costa in ue5-main branch]
* Visualize texture system starts out in an inactive state until a command is issued, avoiding overhead of tracking views and scene textures, saving 1.4% on the render thread.
* Visualization overhead eliminated for views besides the one currently being visualized.
* Support for visualization of textures from scene captures, via "view=N" option (specifying the unique ID of the view), with "view=?" displaying a list of views for reference.
* Improved visualization for cube maps. PIP uses 2:1 aspect for the longitudinal render to match resource viewer display, and pixel perfect option shows tiled flat cube map faces (actual pixels) rather than running a projection.
* Padding for scene or screen pass textures is removed in the visualization -- the padding otherwise shows up as garbage or blank space.
To remove scene texture padding, it's necessary to add a field to RDG textures to provide an option to track the viewport sizes that were rendered for a given texture. If not set, the assumption is the whole texture was rendered. The field is set for FSceneTextures and FScreenPassTexture, covering the vast majority of cases, plus the denoiser was spot fixed -- worst case if any other cases are missed, you still see the padding. You can tell padding was present when visualizing by contrasting the texture size with the viewport size.
Padding was always a potential issue for the visualizer, but is exacerbated by scene captures, as the padded scene textures are set to a size that's a union of the main view and any scene captures. Padding is also exacerbated by dynamic resolution scaling, as the buffers will be padded to the maximum resolution. For example, a cube map rendering at 512x512 will have 93% of the pixel area as padding if the front buffer is at 1440p, or the default dynamic resolution setup will have 70% of the pixels as padding at minimum res.
#rb Jason.Nadro
[CL 31160232 by jason hoerner in ue5-main branch]
#jira UE-205211
[FYI] luke.thatcher
#tests tested in editor and with a replayrun preflight with the cvar disabled
[CL 31055966 by ben woodhouse in ue5-main branch]
[FYI] tiago.costa
Original CL Desc
-----------------------------------------------------------------
Improvements to tracking of proxies requiring invalidation when raytracing geometry is streamed/built/made resident.
Context:
- The existing CachedRayTracingStateProxiesMap mapped [UStaticMesh -> Array of Proxies that need to be invalidated], however there was no way to map [FRayTracingGeometry -> Array of Proxies that need to be invalidated] since FRayTracingGeometry doesn't have a pointer to which UStaticMesh owns it. On top of that, not every FRayTracingGeometry is associated with a UStaticMesh.
- An alternative approach could be having a map [FRayTracingGeometry -> Array of Proxies that need to be invalidated] however that would require significantly more memory - O(#proxies x #LODs) instead of O(#proxies).
Change:
- Modified CachedRayTracingStateProxiesMap to use a more generic RayTracing::GeometryGroupHandle (int32) as key.
- Store RayTracing::GeometryGroupHandle in FRayTracingGeometry.
#rb aleksander.netzel
[CL 31016413 by tiantian xie in ue5-main branch]
#fyi bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL30976715
#fyi Luke.Thatcher
Original CL Desc
-----------------------------------------------------------------
Remove "r.RecompileRenderer", STORE_ONLY_ACTIVE_SHADERMAPS, and all associated dead code paths that are no longer used.
- r.RecompileRenderer has been broken since at least August 2019 when CL 8231930 disabled the implementation of BackupGlobalShaderMap etc
- STORE_ONLY_ACTIVE_SHADERMAPS was disabled in 14363137 (September 2020) to resolve FORT-312158 (enabling the new loader). Fortnite was the only user of this code path.
- This is a delete-only change.
#jira UE-167133
#rb Arciel.Rekman, Jason.Nadro
[CL 30987478 by bob tellez in ue5-main branch]
#fyi Luke.Thatcher
Original CL Desc
-----------------------------------------------------------------
Remove "r.RecompileRenderer", STORE_ONLY_ACTIVE_SHADERMAPS, and all associated dead code paths that are no longer used.
- r.RecompileRenderer has been broken since at least August 2019 when CL 8231930 disabled the implementation of BackupGlobalShaderMap etc
- STORE_ONLY_ACTIVE_SHADERMAPS was disabled in 14363137 (September 2020) to resolve FORT-312158 (enabling the new loader). Fortnite was the only user of this code path.
- This is a delete-only change.
#jira UE-167133
#rb Arciel.Rekman, Jason.Nadro
[CL 30979008 by bob tellez in ue5-main branch]
- It's causing crashes when loading large levels in the editor: "Assertion failed: !OverflowEventCount".
#rb Zach.Bethel
#jira UE-205211
[CL 30978249 by Luke Thatcher in ue5-main branch]
- r.RecompileRenderer has been broken since at least August 2019 when CL 8231930 disabled the implementation of BackupGlobalShaderMap etc
- STORE_ONLY_ACTIVE_SHADERMAPS was disabled in 14363137 (September 2020) to resolve FORT-312158 (enabling the new loader). Fortnite was the only user of this code path.
- This is a delete-only change.
#jira UE-167133
#rb Arciel.Rekman, Jason.Nadro
[CL 30976715 by Luke Thatcher in ue5-main branch]