214 Commits

Author SHA1 Message Date
carl lloyd
fb258cffbc Fix for material exports attempting to write to depth textures when none are bound
#rb Jon.Cain
#jira UE-225347

[CL 36897477 by carl lloyd in 5.5 branch]
2024-10-07 09:26:38 -04:00
serge bernier
f3620d4994 Support Dynamic shader preloading. Similar to PSOPrecaching, we can load shaders on demand instead of preloading all of them when we load the package. This reduce the memory footprint on shaders since we only load shaders that will be used for rendering. Shader preloading also support the same code logic to delay the creation of the prender proxy when the shaders are not finished loading.
Save up to 16MB on some platforms.

#rb daniele.vettorel, danny.couture, Kenzo.Terelst
#tests 66d8b4154a47dde1dd226334



#ushell-cherrypick of 36036431 by serge.bernier (first of 2 submits)

[CL 36747837 by serge bernier in 5.5 branch]
2024-10-01 17:48:22 -04:00
joe kirchoff
3ee75c7d9d Fix clang 18 -Wshadow warnings
#rnx

[CL 34483848 by joe kirchoff in ue5-main branch]
2024-06-18 18:43:08 -04:00
jamie hayes
ec625768bf Partial backout of 33180448.
The displacement scaling material node doesn't work correctly with material instances that do not create static permutations, and we can't assume that displacement scaling of the material can be known as final during material translation. As a result, we stop trying to determine if a constant displacement could effectively disable tessellation and instead return to disabling displacement when the displacement pin has not been connected, which can still be used (via Material Attributes) to disable displacement based on static switches.

#rb massimo.tristano
#rnx

[CL 33576411 by jamie hayes in ue5-main branch]
2024-05-10 11:24:22 -04:00
jamie hayes
ffb56f2811 Ensure the displacement material attribute is always defaulted to the center and make it so that displacement set to a constant that is equal to center disables displacement for the material.
#rb massimo.tristano

[CL 33180495 by jamie hayes in ue5-main branch]
2024-04-23 17:17:42 -04:00
christopher waters
ae9b1051dc Adding Texture Collection
- UTextureCollection data asset that just holds an array of Texture assets.
- Uses the new RHIResourceCollection RHI resource type which puts all the texture bindless indices into its own buffer.
- Adding TextureCollection material nodes for accessing and sampling from Texture Collections.

#rb massimo.tristano

[CL 32897524 by christopher waters in ue5-main branch]
2024-04-11 13:49:14 -04:00
sebastien lussier
5115db18b1 Merge Actor - Properly handle custom primitive data when baking materials
* Forward custom primitive data info to material baking
* Added Custom Primitive Data case to material baking engine test
* Also updated broken Material Baking tests screenshots as subtle differences are now occuring on shadows... Disabled shadows from the map light source to minimize noise in future test results
#rb JeanFrancois.Dube

#virtualized

[CL 32298478 by sebastien lussier in ue5-main branch]
2024-03-18 09:05:54 -04:00
luke thatcher
01203093c6 Deprecate:
- FRHITexture2D
 - FRHITexture2DArray
 - FRHITexture3D
 - FRHITextureCube
 - FTexture2DRHIRef
 - FTexture2DArrayRHIRef
 - FTexture3DRHIRef
 - FTextureCubeRHIRef

Replaced with FRHITexture and FTextureRHIRef

These types were unified in UE 5.1 and have been defined via "using" statements to the same underlying texture type for several engine releases.

#rb christopher.waters

[CL 31724002 by luke thatcher in ue5-main branch]
2024-02-22 11:38:35 -05:00
christopher waters
5a0e169c6d Getting more headers compiling solo on Win64.
#rb joe.kirchoff, henrik.karlsson

[CL 31663239 by christopher waters in ue5-main branch]
2024-02-20 18:57:35 -05:00
sebastien lussier
880d3b0aa6 Material Baking - Fix crashes occurring when a GC was performed during material baking
#rb JeanFrancois.Dube

[CL 31380140 by sebastien lussier in ue5-main branch]
2024-02-12 09:03:21 -05:00
steve robb
6d5b974842 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30735396 by steve robb in ue5-main branch]
2024-01-19 19:41:56 -05:00
sebastien lussier
5509a705b4 Material Baking - Better handle invalid entries
* Do not include empty entries in the array to be processed
#rb Patrick.Enfedaque

[CL 30243892 by sebastien lussier in ue5-main branch]
2023-12-11 13:53:14 -05:00
sebastien lussier
b7764ed47f Material Baking - Modified default logging verbosity to "Log" rather than "All"
[CL 29991686 by sebastien lussier in ue5-main branch]
2023-11-29 12:32:50 -05:00
jason nadro
f5ab65daa4 Fix crash in the Material Baking Module where it was trying to delete a material render proxy while shader compilation was happening in the background.
- We can't simply enqueue a render command and `delete` the proxy.
- Call the `FMaterial::DeferredDeleteArray` helper function which will properly cancel shader compilation if in-flight.

#rb Sebastien.Lussier
#rnx

[CL 29864493 by jason nadro in ue5-main branch]
2023-11-21 10:19:58 -05:00
dmitriy dyomin
b967feaef8 Add ability to setup VT support on a per-platform basis
#rb jeremy.moore

[CL 28260983 by dmitriy dyomin in ue5-main branch]
2023-09-26 22:38:26 -04:00
eric renaudhoude
96df7eed02 Deprecating unused view family gamma correction.
#rb arciel.reckman, rod.bogart

[CL 27996251 by eric renaudhoude in ue5-main branch]
2023-09-19 11:03:24 -04:00
zach bethel
501f4cff04 Refactored mesh collector and dynamic vertex / index buffers in preparation for moving GDME off the render thread.
- Added GetRHICommandList() method to FMeshElementCollector.
 - Removed global dynamic vertex / index buffers in favor of local variants.
 - Added some locks to shared systems.

#rb stu.mckenna
#jira none

[CL 27800441 by zach bethel in ue5-main branch]
2023-09-12 14:10:58 -04:00
sebastien lussier
69fec4b0c5 VK - HLODs freeze when trying to build
* Prevent blocking call to UTexture::ForceUpdateTextureStreaming(). Some requests require the main thread to be ticked in order to run to completion.
#rb trivial

[CL 27434808 by sebastien lussier in ue5-main branch]
2023-08-28 23:04:09 -04:00
marc audy
d1f48fc5c8 Fix implicit capture of this using [=] deprecated in C++20
#jira
#rnx

[CL 25989494 by marc audy in ue5-main branch]
2023-06-14 15:07:58 -04:00
bryan sefcik
da92084a12 Optimized out more private modules includes and dependencies.
#preflight 64627c382965f6ea8ea83bd6

[CL 25479683 by bryan sefcik in ue5-main branch]
2023-05-15 16:26:12 -04:00
Sebastien Lussier
3da9022ec0 MaterialBaking: Use correct RenderCaptureInterface::FScopedCapture() constructor on the render thread.
#fyi anousack.kitisa
#jira none
#rb trivial
#preflight skip

[CL 25371110 by Sebastien Lussier in ue5-main branch]
2023-05-08 11:12:14 -04:00
Sebastien Lussier
b5f103c2a5 Material Baking - Readd support for MaterialBaking.RenderDocCapture cvar which wasn't doing anything anymore since a recent refactor
#preflight skip
#rb philippe.deseve
#jira none

[CL 25334844 by Sebastien Lussier in ue5-main branch]
2023-05-04 10:28:09 -04:00
aidin abedi
21543249dd Fix material baking incorrectly stating that EmissiveColor is baked as sRGB while in reality it's always baked as linear because of the HDR rendertarget.
Please note that this change doesn't actually affect any baking results, because EmissiveColor always reads linear data from its HDR rendertarget regardless of PerPropertyColorSpace. The fix only affects the value returned by FMaterialBakingModule::IsLinearBake for EmissiveColor, which until now has been incorrect due to the missmatch between PerPropertyColorSpace and how EmissiveColor is actually baked.

#jira UE-184310
#review-25298709 @Jason.Nadro
#preflight 6450d1a70e33f2d51d22b142

[CL 25301160 by aidin abedi in ue5-main branch]
2023-05-02 10:11:29 -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
Stu McKenna
689adbad98 - Add Particle Sprite Rotation material function
#rb rob.krajcarski
#jira UE-140361
#preflight 64418648f126d87e4590b10f

[CL 25154395 by Stu McKenna in ue5-main branch]
2023-04-21 17:35:23 -04:00