77 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
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
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
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
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
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
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
sebastien lussier
4f5f06aea0 Added a CRC to the MaterialBaking module, to be able to detect if code (by changing the base key) or setting changes could require an HLOD rebuild
#rb jeanfrancois.dube

[CL 24082386 by sebastien lussier in ue5-main branch]
2023-02-08 16:14:18 -05:00
sebastien lussier
bda8942ff2 Material Baking - Added "MaterialBaking.ForceDisableEmissiveScaling" CVar (disabled by default)
* If set to true, values stored in the emissive textures will be clamped to the [0, 1] range rather than being normalized and scaled back using the EmissiveScale material static parameter
#rb jeanfrancois.dube

[CL 24075476 by sebastien lussier in ue5-main branch]
2023-02-08 12:33:41 -05:00
aidin abedi
7205306d48 Add FMaterialBakingModule::IsLinearBake to determine if a material property is baked to a linear texture or not
#jira none
#review @Jason.Nadro @Kevin.Ortegren
#preflight 63c9795a0225f00e14a99bd8

[CL 23808244 by aidin abedi in ue5-main branch]
2023-01-23 01:21:39 -05:00
aidin abedi
86152b0bc7 Add support for material baking custom output transmittance color and fix crash when baking invalid custom output
#jira UE-131149
#preflight 63ae50efc16855964d09967c
#review @Kevin.Ortegren @Massimo.Tristano

(based on PR #8498)

[CL 23767003 by aidin abedi in ue5-main branch]
2023-01-18 18:21:18 -05:00
aidin abedi
7d0da30082 Add support for material baking refraction property
#jira UE-131147
#review @Kevin.Ortegren @Massimo.Tristano

(based on PR #8496)
#preflight 63c6ce4f3f587d9e14ece2b0

[CL 23739612 by aidin abedi in ue5-main branch]
2023-01-17 11:53:37 -05:00
aidin abedi
8fe4cdb936 Add support for using material baking to efficiently check UV overlap
#jira UE-131151
#review @Kevin.Ortegren @Massimo.Tristano

(based on PR #8500)
#preflight 63c6c7ff02024f93d861359e

[CL 23739117 by aidin abedi in ue5-main branch]
2023-01-17 11:26:41 -05:00
aidin abedi
cd6a77b27f Add support for material baking shading model property
#jira UE-131148
#review @Kevin.Ortegren @Massimo.Tristano

(based on PR #8497)
#preflight 63c6c0220b358b97d1983695

[CL 23738607 by aidin abedi in ue5-main branch]
2023-01-17 10:53:19 -05:00