Commit Graph

31 Commits

Author SHA1 Message Date
Sebastien Hillaire
255a2b8a59 Strata - now using force cast of data when sent to backend fucntions to have a behavior close to the root node. (2d TexCoord can be used as Emissive color for instance)
#rb none
#preflight none
#fyi charles.derousiers

[CL 19806375 by Sebastien Hillaire in ue5-main branch]
2022-04-19 07:13:36 -04:00
Charles deRousiers
9d440f6a81 Remove STRATA_DATA_TILE_XXX to avoid confusion with STRATA_TILE.
#rb none
#jira none
#preflight 6245dbf39f404234145fc039

[CL 19574692 by Charles deRousiers in ue5-main branch]
2022-03-31 13:05:44 -04:00
Sebastien Hillaire
4100e391ab Strata more defines clean up
#rb none
#preflight none
#fyi charles.derousiers

[CL 19539341 by Sebastien Hillaire in ue5-main branch]
2022-03-29 02:29:00 -04:00
Sebastien Hillaire
811ac749a9 Strata - refactor and clean up of FStrataMaterialCompilationInfo into the strata tree.
#rb none
#preflight https://horde.devtools.epicgames.com/job/62421016b6084b98321ad00e
#fyi charles.derousiers

[CL 19538779 by Sebastien Hillaire in ue5-main branch]
2022-03-29 01:49:06 -04:00
Charles deRousiers
b993ce8650 Add BSDF tile and BSDF offset computation.
For pixel with complex/multi-BSDF computes BSDF material byte/index offsets and 'overflowing' tile.

This wil be used by Lumen for handling/parallelizing lighting computation.

#rb none
#jira none
#preflight 6234c38848746817f13c87bb
#fyi sebastien.hillaire

[CL 19438082 by Charles deRousiers in ue5-main branch]
2022-03-18 13:43:33 -04:00
Sebastien Hillaire
781eddedd8 Strata - fixed legacy material issues with opaque rough refractions.
#rb none
#preflight none

[CL 19419681 by Sebastien Hillaire in ue5-main branch]
2022-03-17 08:56:51 -04:00
Sebastien Hillaire
13414c64e6 Strata opaque rough refraction with place holder blur process.
Tiles with SSS but no rough refraction are also added onto the scene color buffer separately from the blur process.

#rb none
#preflight
#fyi charles.derousiers

[CL 19404162 by Sebastien Hillaire in ue5-main branch]
2022-03-16 05:45:43 -04:00
Sebastien Hillaire
1ffe7c958d Strata - Refactored indirect dispatches to source from the same indierect draw buffer, thus avoiding hitting out of uav slots on dx11.
#rb none
#preflight https://horde.devtools.epicgames.com/job/6230946ce65a7e65d6855346
#fyi charles.derousiers

[CL 19384753 by Sebastien Hillaire in ue5-main branch]
2022-03-15 09:55:16 -04:00
Charles deRousiers
9090280376 Change thin layer to act as an Strata operator.
This simplify Strata Slab UI, and make it easier to thin-film coat many BSDFs at the same time.

#rb none
#jira none
#preflight 622fa337c51b66df4c248174
#fyi sebastien.hillaire

[CL 19378172 by Charles deRousiers in ue5-main branch]
2022-03-14 16:46:59 -04:00
Sebastien Hillaire
b8821a1964 Big Strata core update!
- Completely changed the way we evaluate and represent the material topology.
- A topology is now represented as a tree to allow any horizontal/vertical operations (almost like a kdtree).
- This allows for correct translucent material coverage/transmittance evaluation, as well as correct BSDFs luminance weight (finally).
- All the operations to be able to do that are expended in HLSLTranslator instead of letting the compiler handle it (otherwise was too slow, leading to bugs and could not even debug shaders). This means no conditional BSDF packing.
- There is no more Material/layer/BSDFs array: only a Tree or operators, some of them being BSDF at leaves.
- Parameter blending has also been updated: when enabled on a node, it will be forced on all the oprator child / in the sub tree.
- Parameter blending is applied on an inlinedbsdf on the StrataData. When it is the root of the parameter blending subtree, it is promoted to a fully fledged BSDF operator node to allow other regular operators.
- The inlinedbsdf is not longer in premultiplied mode. Horizontal/Vertical/Add parameter blending operators have been updated to reflect that. This allows for simpler/unified/clearer code.
- Vertical blending now uses the new simple "layering of two slabs with uncorelated coverage" math I have RnD'd. See GetVerticalLayeringInfo in ShadingCommon.ush.

Follow up to this CL:
- CompileStrataBlendFunction should use parameter blending.
- Add more compilation debug output
- Update material vizualisation
- Fix Rough refraction
- Fix decals
- Fix debug probes
- Pack FStrataBSDF
- Move all StrataCompilationInfoCreateSingleBSDFMaterial into into the strata tree and rework cost evaluation and material LOD
- Expand graph visit such as UpdateBSDFWeightAfterOperatorVisit to be specific to operators for the compiler to have to do less search to inline what we know already
- Fix STRATA_TODO: operation using parameter blending are not actually discarded so they still occupy a pot in the opeartion arrays in the compiler and in the shader also.

#rb charles.derousiers
#preflight https://horde.devtools.epicgames.com/job/620a5f5d803d9066e67de938
#fyi charles.derousiers

[CL 18993400 by Sebastien Hillaire in ue5-main branch]
2022-02-15 03:09:30 -05:00
sebastien hillaire
9d09d19e34 Strata leverage UAV slice start/count to remove the post base pass copy step.
Ran Strata and non Strata code path.
QAGame cooked on Swi.
ShoorterGame cooked and ran on PC.
#rb charles.derousiers
#preflight https://horde.devtools.epicgames.com/job/61d47489db0309127dfae2a2

#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 18509133 in //UE5/Release-5.0/... via CL 18509155
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18509183 by sebastien hillaire in ue5-release-engine-test branch]
2022-01-04 12:18:49 -05:00
sebastien hillaire
956da1713d Fix for a pltform to compile when strata is off.
We always compile the tile vertex shader and this includes  strata.ush. We will fix compilation issue there when we get to it.

#jira https://jira.it.epicgames.com/browse/UE-137866
#rb none
#preflight https://horde.devtools.epicgames.com/job/61d42e9f932a02483cb8d000
[FYI] charles.derousiers

#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 18506891 in //UE5/Release-5.0/... via CL 18506899
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18506901 by sebastien hillaire in ue5-release-engine-test branch]
2022-01-04 06:43:29 -05:00
charles derousiers
b44703f4d2 Remove unecessary Gbuffer output during base pass when strata is not enabled.
#rb sebastien.hillaire
#jira none

#ROBOMERGE-AUTHOR: charles.derousiers
#ROBOMERGE-SOURCE: CL 18280952 in //UE5/Release-5.0/... via CL 18280965
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18280989 by charles derousiers in ue5-release-engine-test branch]
2021-11-24 04:59:01 -05:00
charles derousiers
f73f7ea590 * Change classification texture to be encoded on 16bits rather 32bits
* Remove unused Strata VGPRs array

#rb none
#jira none
[FYI] sebastien.hillaire

#ROBOMERGE-AUTHOR: charles.derousiers
#ROBOMERGE-SOURCE: CL 18258719 in //UE5/Release-5.0/... via CL 18258732
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18258742 by charles derousiers in ue5-release-engine-test branch]
2021-11-22 10:26:42 -05:00
sebastien hillaire
f2fd5ab666 Strata: renamed "shared normal" to "shared tangent basis"
#rb none
[FYI] charles.derousiers

#ROBOMERGE-SOURCE: CL 16358769 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16358782 by sebastien hillaire in ue5-release-engine-test branch]
2021-05-17 16:41:40 -04:00
Sebastien Hillaire
467deab426 Added support for thin lighting model to Strata (a.k.a. TwoSided ligthing model).
First version, will be improved.

DMFP input is used to control the back face lighting transmittance using MFP representation.
It is not possible to combine the Thin lighting and SSS mode so SSS post process is forced disabled when Thin lighting model is encoutered

#rb charles.derousiers

[CL 16125446 by Sebastien Hillaire in ue5-main branch]
2021-04-27 09:42:01 -04:00
Sebastien Hillaire
f1a86a4bd8 Moved fuzz/cloth onto the Slab node.
#rb charles.derousiers

[CL 16071055 by Sebastien Hillaire in ue5-main branch]
2021-04-21 06:47:25 -04:00
Sebastien Hillaire
97dc02cdba Fixed Strata default thickness to be 0.1millimeter as discussed before.
#fyi charles.derousiers

[CL 15490727 by Sebastien Hillaire in ue5-main branch]
2021-02-22 12:41:28 -04:00
Sebastien Hillaire
0f480e8e08 Strata more optimisation and decoupling from GBuffer
- added a simple and fast clear path of the material buffer
- light and env light passes now reads AO and isStrataMaterial from the StrataHeader. No longer reads the classification or gbuffer data.
- Handle the max BSDF count case from the compiler.

Clear est 0.1ms at 1080p
SkyEnv pass cost 0.7->0.6ms et occupancy 60->70%

#rb Charles.deRousiers

[CL 15364191 by Sebastien Hillaire in ue5-main branch]
2021-02-09 04:08:35 -04:00
Sebastien Hillaire
1909d53c22 Strata data are now stored in 8x8 tiles and this prevent gpu being starved because data is not coming fast enough through the cache.
Default-no-strata => Strata before => Strata after simple tiled memory
Base pass: 	1.2 => 2.4 => 1.4 ms
Light pass: 	0.7 => 1.6 => 0.6 ms
SkyEnv:    	1.0 => 2.0 => 0.7 ms
Classification 	xx => 2ms => 0.15 ms

#rb Charles.deRousiers

[CL 15336377 by Sebastien Hillaire in ue5-main branch]
2021-02-05 05:07:37 -04:00
Sebastien Hillaire
939aeb0269 Strata: unified diffuse, dielectric and conductor behind a common slab interface with Disney.
There will be naming update after (not done here to not bloat the review) and update for the metal/volume representation after.

#rb charles.derousiers

[CL 15065874 by Sebastien Hillaire in ue5-main branch]
2021-01-13 07:11:07 -04:00
Sebastien Hillaire
d66d562244 Strata support for single layer water.
A few renaming

#rb Charles.deRousiers

[CL 14951854 by Sebastien Hillaire in ue5-main branch]
2020-12-17 17:57:17 -04:00
Sebastien Hillaire
1f4305a9de Added Strata HairBSDF for HairStrand (all supported) and deferred lighting path (some follow up will be required)
#rb charles.derousiers

[CL 14868886 by Sebastien Hillaire in ue5-main branch]
2020-12-07 06:10:12 -04:00
Sebastien Hillaire
ad7877041a Auto MSM/Domain set from graph for volumetric and unlit.
Added strata shading model as material info to infor domain/blend/MSM.
This work with material function and material layer.
Added unlit node and shader support for it.

#rb Charles.deRousiers.

[CL 14826806 by Sebastien Hillaire in ue5-main branch]
2020-12-01 03:43:19 -04:00
Sebastien Hillaire
a6c37b5aa7 Starta node only for volumetric fog/cloud. It never goes into the Strata GBuffer.
Only usable in the volumetric domain.
Added support for emissive on all BSDF, only taken advantage of by voluemtricFogCloud as of today.

Shootergame compiled and ran on pc.

#rb charles.deRousiers

[CL 14817295 by Sebastien Hillaire in ue5-main branch]
2020-11-27 11:02:03 -04:00