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
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
5e47c0fe58
Fix incorrect normals when baking certain materials. The issue is due to a change in 5.2, which introduces a new virtual method, FMaterialResource::IsTangentSpaceNormal, that determines whether a material uses tangent-space normals or world-space. The baking module needs to override this method and forward all IsTangentSpaceNormal calls to the actual material being baked to properly determine which space the normals should be in.
...
#jira UE-170383 UE-173004
#preflight 63df227378716a01e849bc7b
#rb massimo.tristano
#lockdown jeanmichel.dignard
[CL 24031430 by aidin abedi in ue5-main branch]
2023-02-06 11:19: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
d58aa5718b
Fix incorrect results when material baking some properties in a translucent material. To also avoid future issues like this, the fix removes all hard-coded assumptions in the baking module, regarding which properties are active depending on blend mode. These assumptions are not feasible to manually keep in-sync with the latest material behavior and therefore it's better to let the caller of the material baking module decide how to handle potentially inactive properties.
...
#jira UE-174381
#review @Massimo.Tristano @Kevin.Ortegren
#preflight 63c70eb22e714f64ad562f69
[CL 23773062 by aidin abedi in ue5-main branch]
2023-01-19 09:47:31 -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
aidin abedi
001c32df84
Add support for material baking expressions that rely on primitive data
...
#jira UE-132097
#review @Kevin.Ortegren @Massimo.Tristano
(based on PR #8526 )
#preflight 63c6b27302024f93d8591a46
[CL 23737565 by aidin abedi in ue5-main branch]
2023-01-17 09:51:53 -05:00