Commit Graph

328 Commits

Author SHA1 Message Date
yuriy odonnell
2cbf0bfb74 GPULightmass - Fix missing GPULIGHTMASS_API
#rb none (trivial)

[CL 27626823 by yuriy odonnell in ue5-main branch]
2023-09-06 02:01:25 -04:00
yuriy odonnell
35dcb1b010 GPULightmass - Fix missing header include
#rb none (trivial)

[CL 27626179 by yuriy odonnell in ue5-main branch]
2023-09-06 01:19:59 -04:00
yuriy odonnell
6a8aa90261 GPULightmass - Fix logic for determining if viewport is realtime
#rb Aleksander.Netzel

[CL 27625969 by yuriy odonnell in ue5-main branch]
2023-09-06 01:06:56 -04:00
tiago costa
62242df915 Moved IsStaticLightingAllowed() to RenderUtils.h and replaced relevant usage.
#rb ola.olsson

[CL 27557666 by tiago costa in ue5-main branch]
2023-09-01 12:07:26 -04:00
dominic couture
8bc739dd3e This changelist contains various changes to allow the creation of FPrimitiveSceneProxy & FPrimtiveSceneInfos for meshes not associated with an AActor/UPrimitiveComponent pair. In other words, it's now possible to add primitives to FScene that aren't associated with AActors & UPrimitiveComponents. These are additional entry points, all existing code should continue to build & execute as is.
*Added FPrimitiveSceneDesc, a structure you can initialize with a description of the primitive you're trying to Add/Remove/Update in the FScene
-Added entry points in FSceneInterface to do those operations, legacy entry points using UPrimitiveComponent are untouched.
-The code that executes those operations in FScene has been refactored to be shared between the two entry points as much as possible to lessen the additional maintenance burden.


*Added FPrimitiveSceneProxyDesc/FStaticMeshSceneProxyDesc/FInstancedStaticMeshSceneProxyDesc, structures that hold all the necessary information to create a FPrimitiveSceneProxy/FStaticMeshSceneProxy/FInstancedStaticMeshSceneProxy without depending on AActors or UPrimitiveComponent.
-Those structures can be initialized by constructing them with the corresponding UPrimitiveComponents, or by constructing their default versions and initializing the desired fields.
-Creation code for FPrimitiveSceneProxy/FStaticMeshSceneProxy/FInstancedStaticMeshSceneProxy now takes all its info from those desc structures. They are created on demand during scene proxy creation for UPrimitiveComponents. This means no additional memory, and all serialized assets & blueprints are unaffected.


*Added IPrimitiveComponent/IStaticMeshComponent interfaces
-These allow for some editor-only interactions occurring during proxy creation, and serve as a common interface for some code that expected to manipulate UPrimitiveComponent/UStaticMeshComponents. For example FObjectCacheEventSink / FObjectCacheContext now uses those interfaces to associate the resources between various users and interactions like proxy recreation on shader/mesh changes occur through those interfaces.


* Misc
-Moved scene primitive related member variables into a new structure (FPrimitiveSceneInfoData) to facilitate code sharing and implementations of various related functionality (like SetLastRenderTime).
-Changed ObjectCacheContext to store associations between resources and components using component interfaces so that other systems creating proxies have the proper behaviors when resource changes require proxy recreation.
-Added natvis support so that component interfaces to UPrimitiveComponent/UStaticMeshComponent display the component ptr for easier debugging.
-Changed FMotionVectorSimulation to use UObject* instead of UPrimitiveComponent*, it was already using this internally
-Templatized some nanite helpers like ShouldCreateNaniteProxy & AuditMaterials since we need to use them from both UPrimitiveComponent & FPrimitiveSceneProxyDesc and it'll help make sure we keep them in sync.

#jira UE-191990

#rb Zach.Bethel, Ola.Olsson, Jason.Nadro, Krzysztof.Narkowicz

[CL 27200716 by dominic couture in ue5-main branch]
2023-08-18 09:26:39 -04:00
aleksander netzel
5f66567e0e GPULM: Hide decal segments using hidden material when baking lightmaps.
#jira UE-191926
#rb chris.kulla

[CL 26836749 by aleksander netzel in ue5-main branch]
2023-08-03 21:54:06 -04:00
jian ru
0354676a20 Add back a missing virtual method implementation
[CL 26728487 by jian ru in ue5-main branch]
2023-07-31 21:05:58 -04:00
bryan sefcik
64f140d78d Added shader.build.cs file.
Updated build.cs files to use new shader module.

#jira
#rb Joe.Kirchoff and guillaume.abadie

[CL 26664107 by bryan sefcik in ue5-main branch]
2023-07-27 22:53:25 -04:00
yoan stamant
a01bed63ef Fixed some uninitialized FBox
#rb matt.peters

[CL 26419465 by yoan stamant in ue5-main branch]
2023-07-17 18:10:43 -04:00
marc audy
1b8e7f29c4 Rework GPUScene support on mobile platforms.
Platforms that do support uniform buffer objects can now provide batched primitive data through UBO. There is a limit UBO range that can be accessed in shaders, so we group instances into batches that fit into this limit. Switch uses 64KB views, other platfroms16KB views. For each primitive we allocate 512Bytes and 256Bytes for instance. Mobile platforms that do not support UBO will use a desktop version of GPUScene.
There are a few things that still missing: Dynamic mesh passes,  static lighting
#rb ola.olsson, benjamin.rouveyrol

[CL 26354848 by marc audy in ue5-main branch]
2023-06-30 16:34:38 -04:00
aleksander netzel
2b45923292 GPULM: Fix BentNormal not being saved.
#rb none

[CL 26226096 by aleksander netzel in ue5-main branch]
2023-06-24 13:05:14 -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
c42ad4eeba Fixed build break.
[CL 26185004 by zach bethel in ue5-main branch]
2023-06-22 12:07:43 -04:00
zach bethel
f16c9d124a Fixed build break.
[CL 26184794 by zach bethel in ue5-main branch]
2023-06-22 12:02:26 -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
zach bethel
a7a9029b20 Deprecated InitRHI() in favor of InitRHI(FRHICommandListBase&).
#rb mihnea.balta, luke.thatcher, christopher.waters

[CL 26097009 by zach bethel in ue5-main branch]
2023-06-19 13:56:56 -04:00
aleksander netzel
170caa85e6 Add analytics to GPU Lightmass
#rb Wes.Hunt

[CL 26020361 by aleksander netzel in ue5-main branch]
2023-06-15 14:01:05 -04:00
zach bethel
a9a5fa39db Deprecated non-command list variant of InitResource and UpdateResource. Patched the engine to pass command lists through. Follow-up CL's will refactor individual locations to thread command lists through the various callstacks, but that was done very judiciously in this CL to reduce risk.
#rb mihnea.balta, christopher.waters

[CL 25953623 by zach bethel in ue5-main branch]
2023-06-13 11:46:40 -04:00
aleksander netzel
3f0630e4a9 GPULM: Set a dummy LooseParameters UB for instanced meshes to prevent a crash.
#preflight 646d45883e151fa04e9eea84
#jira UE-185926

[CL 25594884 by aleksander netzel in ue5-main branch]
2023-05-23 19:21:51 -04:00
Charles deRousiers
2671992065 Remove unused standalone SSS profile texture reference.
#rb none
#jira none
#preflight 646bb25f1b241f074806ff28

[CL 25568090 by Charles deRousiers in ue5-main branch]
2023-05-22 14:36:34 -04:00
christopher waters
47d9d13b0a Removing -O0 workaround
#jira UE-165154
#preflight 644af8d409453df5488b0ee1

[CL 25286935 by christopher waters in ue5-main branch]
2023-05-01 13:42:18 -04:00
jamie hayes
30df0b799f More GPU Scene data code clean-up:
- Move primitive data stride to SceneDefinitions header so we don't have to change it in 3 places in code.
- Move FPrimitiveSceneShaderData to its own header to (eventually) eliminate dependencies that adversely affect compile time.
- Deprecate scatter upload buffer support for texture targets and prepare to clean up hacks that were previously done for the sake of GPU Scene that are no longer needed.

#rb ola.olsson
#preflight 644fe4750e33f2d51d787e71

[CL 25285293 by jamie hayes in ue5-main branch]
2023-05-01 12:39:32 -04:00
aleksander netzel
a3304a7afa GPULM: Check ray tracing status all the time in case preview mode changes.
#jira UE-183712
#rb none
#preflight 6449bb0c1150e908d0c5b429

[CL 25209800 by aleksander netzel in ue5-main branch]
2023-04-26 20:26:24 -04:00
Ola Olsson
77d15449ac Deduplicated primitive flags to a shared header & also deduplicated shader paramter construction to shared function in the proxy.
- Also moved FPrimitiveUniformShaderParametersBuilder to its own header to cut down rebuilding when changing scene & nanite definitions.

#rb jamie.hayes
#preflight 644919d41c2846595cfdbf28

[CL 25199110 by Ola Olsson in ue5-main branch]
2023-04-26 11:26:23 -04:00
aleksander netzel
d8ae36e5d2 Disable GPULM when using a shader preview mode.
#jira UE-183712
#rb yujiang.wang
#preflight 64416e92a35280ed4f49686d

[CL 25131649 by aleksander netzel in ue5-main branch]
2023-04-20 13:59:57 -04:00