206 Commits

Author SHA1 Message Date
sebastien lussier
22e2777271 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 32499424 by sebastien lussier in 5.4 branch]
2024-03-26 02:22:45 -04:00
sebastien lussier
746b11dea3 Material Baking - Fix crashes occurring when a GC was performed during material baking
#rb JeanFrancois.Dube

[CL 31380135 by sebastien lussier in 5.4 branch]
2024-02-12 09:02:50 -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
aidin abedi
bae0fd899a Amend previous fix (25014983): Fix material baking incorrectly ignores specific UV space when using mesh data
Previous fix only works when mesh data is a quad, this amended fix works for arbitrary mesh data.


#jira UE-183148
#review @Jason.Nadro
#preflight 643ef22fb550f425ace042c9

[CL 25095680 by aidin abedi in ue5-main branch]
2023-04-18 17:33:35 -04:00
jamie dale
933348f856 Use the FMessageDialog overloads that pass the optional title by-value
#jira
#rb none
#rnx

[CL 25062589 by jamie dale in ue5-main branch]
2023-04-15 19:49:32 -04:00
aidin abedi
eaeafb13bf Fix material baking incorrectly ignoring specific UV space when using mesh data
#jira UE-183148
#review @JeanLuc.Corenthin @Jason.Nadro @Kevin.Ortegren
#preflight 64370c8a00398d6f886f19f1

[CL 25014983 by aidin abedi in ue5-main branch]
2023-04-12 16:27:33 -04:00
graham wihlidal
e1db51128e Nanite (WIP) scalar displacement UX support in material editor.
#rb jason.nadro, arciel.rekman, brian.karis
#preflight 6435a2e7127980724bfb7e4e

[CL 24997884 by graham wihlidal in ue5-main branch]
2023-04-11 16:48:54 -04:00
sebastien lussier
daa2f8be29 Material Baking - Made baking more resilient to materials that output none of the requested properties (diffuse, normal, etc)
#rb philippe.deseve

[CL 24542666 by sebastien lussier in ue5-main branch]
2023-03-07 12:25:14 -05:00
sebastien lussier
25d57df2f5 Material Baking - Fix incorrect use of ProcessEmissiveOutput()
* Pitch in is pixels, not bytes
#rnx
#rb jeanfrancois.dube

[CL 24251953 by sebastien lussier in ue5-main branch]
2023-02-16 02:09:13 -05:00
sebastien lussier
d5b66a61f2 Material Baking - Added optimized code path when baking a set of meshes with remapped UVs
* In this case, instead of baking each mesh material property to it's own buffer, we can write all the meshes to the same buffer as their UVs are already the final ones that do not overlap
* Memory usage is greatly reduced (in test case with ~300 materials to bake, peak is reduced by 5.5GB)
* A lot faster to process (~2x in most cases) as we are doing a single RT readback per baked material property
* We can also skip the final merge of the baked outputs, as we have a single one

Refactored the material baking module to have both code paths (single output and multi outputs) share as much code as possible

#rb jeanfrancois.dube
#preflight 63eba6e0284e76cdadbecb48

[CL 24226039 by sebastien lussier in ue5-main branch]
2023-02-14 22:23:44 -05:00
sebastien lussier
f026ca0289 Material Baking - When force streaming in all the referenced textures mips, use a better(faster) mechanism to wait for completion
#rb jeanfrancois.dube

[CL 24174522 by sebastien lussier in ue5-main branch]
2023-02-13 10:07:21 -05:00