Commit Graph

74 Commits

Author SHA1 Message Date
jason hoerner
af48ea5a98 UE5_MAIN: Multi-view-family scene renderer refactor, part 2. Move FSceneTextures singleton out of RDG blackboard and FSceneTexturesConfig global variable singleton, into FViewFamilyInfo. This is necessary to allow multiple view families to render in a single render graph and a single scene renderer call.
* Existing calls to CreateSceneTextureShaderParameters and similar functions use "GetSceneTexturesChecked", which allows for the possibility that they are reached in a code path where scene textures haven't been initialized, and nullptr is returned instead of asserting.  The shader parameter setup functions then fill in dummy defaults for that case.  The goal was to precisely match the original behavior, which queried the RDG blackboard, and gracefully handled null if scene textures weren't there.  This definitely appears to occur in FNiagaraGpuComputeDispatch::ProcessPendingTicksFlush, which can be called with a dummy scene with no scene textures.  In the future, I may change this so dummy defaults are filled in for FSceneTextures at construction time, so the structure is never in an uninitialized state, but I would like to set up a test case for the Niagara code path before doing that, and the checks aren't harmful in the meantime.
* I marked as deprecated global functions which query values from FSceneTexturesConfig, but they'll still work with the caveat that if you use multi-view-family rendering, the results will be indeterminate (whatever view family rendered last).  There was only one case outside the scene renderer that accessed the globals (depth clear value), which I removed, noting that there is nowhere in the code where we modify the depth clear value from its global default.  I would like to permanently deprecate or remove these at some point.  Display Cluster is the only code that's currently using the multi-view-family code path, and as a new (still incomplete) feature, third party code can't be using it, and won't be affected.

#jira NONE
#rb chris.kulla zach.bethel mihnea.balta
#preflight 6261aca76119a1a496bd2644

[CL 19873983 by jason hoerner in ue5-main branch]
2022-04-22 17:33:02 -04:00
christopher waters
31658ac660 Renderer dependency cleanup focused on removing RenderGraph.h from SceneRenderTargetParameters.h
#jira none
#rb zach.bethel
#preflight 62573bf61543022eed4bc2aa

[CL 19746250 by christopher waters in ue5-main branch]
2022-04-13 17:33:48 -04:00
andrew davidson
cac76b118e Fix FVector2D variant casts - Renderer
Submitted on behalf of fred.kimberley
#rb andy.davidson
#preflight 61f8700e41414fb013dd4002

#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18801433 in //UE5/Release-5.0/... via CL 18802090 via CL 18821511
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18821594 by andrew davidson in ue5-main branch]
2022-02-02 01:43:41 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
andrew davidson
57beb335f2 Merging //UE5/Dev-LargeWorldCoordinates [at] 17581892 to //UE5/Main
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 17595295 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17595306 by andrew davidson in ue5-release-engine-test branch]
2021-09-22 10:01:48 -04:00
dyanikoglu
6e8ba897e2 PR #8372: Fix Lightmap Density Optimization View's Shader Parameter Size Assertion caused by LWC (Contributed by dyanikoglu)
#jira UE-125903

#ROBOMERGE-AUTHOR: julien.stjean
#ROBOMERGE-SOURCE: CL 17460693 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17460712 by dyanikoglu in ue5-release-engine-test branch]
2021-09-08 13:26:34 -04:00
danny couture
25c6066c53 Prepare for the deprecation of direct access to the Resource member of UTexture in favor of the GetResource() accessor.
#rb Francis.Hurteau
#preflight 609e5182ef86d30001ad0a18
#rnx

#ROBOMERGE-SOURCE: CL 16328103 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16328107 by danny couture in ue5-release-engine-test branch]
2021-05-14 07:17:49 -04:00
christopher waters
c45f1dfad5 Removing Tessellation:
- Removed Tessellation settings from Materials and Material Interfaces
- Removed Adjacency buffers from Static and Skeletal Meshes.

#jira UE-94564
#rb jeremy.moore, josie.yang, kevin.ortegren, yuriy.odonnell

#ROBOMERGE-OWNER: christopher.waters
#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 15501023 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
#ROBOMERGE-CONFLICT from-shelf

[CL 15502653 by christopher waters in ue5-main branch]
2021-02-23 14:03:21 -04:00
graham wihlidal
61244769d1 Decoupled more of the GPU scene instance culling work
==
* Added instance offset and count to primitive data, along with GetPrimitiveUniformShaderParameters() diffs
* Remaining FInstanceCullingManager& hooks through functions
* Various todo comments to address later
* Calls to (disabled for now) BuildRenderCommands()
* Mutability of FViewInfo in some spots
* Additional instance culling draw params in a few places
* EVertexInputStreamType cleanup
* UseVirtualShadowMaps() feature capability helper function

#authors ola.olsson, graham.wihlidal
#rb graham.wihlidal
#fyi brian.karis, rune.stubbe

[CL 15092149 by graham wihlidal in ue5-main branch]
2021-01-14 15:46:32 -04:00
graham wihlidal
862e861803 Added instance culling manager and context (disabled, and without shader files), and tons of hooks all over the renderer in preparation for upcoming GPU culling work.
#author ola.olsson
#rb graham.wihlidal
#fyi brian.karis, rune.stubbe

[CL 15082481 by graham wihlidal in ue5-main branch]
2021-01-14 05:23:34 -04:00
zach bethel
c6cb1e82be Deprecated and gutted FSceneRenderTargets. Moved all textures over to FSceneTextures. Refactored the renderer to use RDG textures from FSceneTextures instead.
#rb arne.schober, luke.thatcher, christopher.waters, kenzo.terelst

[CL 15040082 by zach bethel in ue5-main branch]
2021-01-11 14:49:16 -04:00
zach bethel
056a26cddd Refactored uniform buffers to use static bindings as opposed to FPersistentUniformBuffers across the deferred renderer. This removes the view uniform buffer and reflection capture uniform buffers from mesh draw commands and reduces the use of RHIUpdateUniformBuffers.
- View / InstancedView uniform buffers are now bound through RDG directly from the FViewInfo, or created on-demand for cases like jitter-free custom depth.
 - Removed most of the custom persistent view uniform buffers. Left one in Lumen to be done in a later CL.
 - ReflectionCapture uniform buffer is now bound at the RDG pass level.

#rb christopher.waters

[CL 14873982 by zach bethel in ue5-main branch]
2020-12-07 17:43:21 -04:00
zach bethel
ae971f3207 Refactored some functions out of scene renderer and into free functions.
#rb sebastien.hillaire
#rnx

[CL 14677263 by zach bethel in ue5-main branch]
2020-11-06 11:50:06 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Josh Adams
aa9705149b Copying Private-LoadTimes-4.24 stream to Main. Biggest changes are in Materials/Shader memory freezing.
#rb none

[CL 11282608 by Josh Adams in Main branch]
2020-02-06 13:13:41 -05:00
Rolando Caloca
bbb9564388 Copying //UE4/Dev-RenderPlat-Staging@11110326 to //UE4/Main
#rb none
#rnx

[CL 11110369 by Rolando Caloca in Main branch]
2020-01-24 18:07:01 -05:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00
sebastien hillaire
083f0c10cf New water shading model.
Also fix expenssive pipeline issue.
Water no longer depends on IsUsedWithWater

#rb Kevin O


#ROBOMERGE-SOURCE: CL 8888259 via CL 8889221 via CL 8889704
#ROBOMERGE-BOT: (v427-8887818)

[CL 8890341 by sebastien hillaire in Main branch]
2019-09-19 12:41:44 -04:00
sebastien hillaire
029e93bfac New SingleLayerWater rendering tech.
Explanations and todos there https://docs.google.com/document/d/12wltU2nsYNnabLw1H3MdPPd2Uj_myoiQSNysXp39vbc

#rb none


#ROBOMERGE-SOURCE: CL 8810827 via CL 8810829 via CL 8859309
#ROBOMERGE-BOT: (v425-8812723)

[CL 8859746 by sebastien hillaire in Main branch]
2019-09-18 20:56:27 -04:00
Marcus Wassmer
6517c68ef5 Copying //UE4/Dev-RenderPlat-Staging@8684824 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 8684840 by Marcus Wassmer in Main branch]
2019-09-14 09:45:25 -04:00
krzysztof narkowicz
c3f806ef7b New SkyAtmosphere component CLs in FN
Merging using //Fortnite/Main/_to_/UE4/Dev-Rendering
#rb none

Also tested on mobile with Dmitriy.
Improvement and optimisation pending with https://docs.google.com/document/d/17fBBGX_cP9YARfiBU3P9BIElOo2m6IpqJhRXOZvzXa0/edit#heading=h.tuqnyahzdlw8

Integrated / edtigrated CLs are
7555515
7559183
7565353
7577376
7593568
7624000
7785404
7785501
7839046
7861664
7949251
7949481
7951875
7973183


#ROBOMERGE-OWNER: krzysztof.narkowicz
#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 8020041 via CL 8027701
#ROBOMERGE-BOT: (v400-8057353)

[CL 8062409 by krzysztof narkowicz in Main branch]
2019-08-15 13:46:05 -04:00
Rolando Caloca
aa0d2303d6 Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main) @ 6944469
#rb none
#rnx

[CL 6944849 by Rolando Caloca in Main branch]
2019-06-11 18:27:07 -04:00
kevin ortegren
c92b1c86d9 Adds support for multiple shading models per material. Each material now has a bit field of which shading models it is using. Shading models for a material are selected through a new Shading Model material expression, which can be connected to the new Shading Model material output pin. This is opt-in by selecting "From Material Expression" in the Shading Model drop down on the material. With no changes, everything should behave like before, and the old workflow is still there. Optimized shader code should be as performant as before if not using more than one shading model.
[FYI] Chris.Bunner, Krzysztof.Narkowicz, Marcus.Wassmer, Yuriy.Odonnell, Matt.Kuhlenschmidt
#rb Krzysztof.Narkowicz

#ROBOMERGE-OWNER: kevin.ortegren
#ROBOMERGE-AUTHOR: kevin.ortegren
#ROBOMERGE-SOURCE: CL 6308573 via CL 6309266

[CL 6315508 by kevin ortegren in Main branch]
2019-05-06 06:04:18 -04:00
yujiang wang
4d5cbe9bb8 Fix various issues related to lightmap 2-texel padding not being considered
* UVs in lightmap density view were shifting after building lighting. Fixed by considering the padding even if lightmap data is invalid
* Auto generated lightmap UV was snapping charts to the whole padded lightmap instead of the actual valid center region. Fixed by subtracing 2 texels from the packing resolution
* Also fixed some merging conflicts of auto gen

#rb none
[FYI] brian.karis, daniel.wright
#jira UE-64923

#ROBOMERGE-SOURCE: CL 5320218 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 5337165 by yujiang wang in Main branch]
2019-03-07 09:34:27 -05:00
ben marsh
874024cb5f Fix shadow variable warnings when running with StressTestUnity.
#rb none
#jira

#ROBOMERGE-SOURCE: CL 5312040 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 5314703 by ben marsh in Main branch]
2019-03-06 12:44:40 -05:00