Commit Graph

68 Commits

Author SHA1 Message Date
marc audy
65de35fdfb Lof elements that were not renamed yet.
- MSM_Substrate
- MCT_Substrate
- FStrataMaterialInput

#rb charles.derousiers

[CL 27563163 by marc audy in ue5-main branch]
2023-09-01 15:06:19 -04:00
jamie hayes
2e7f0d2858 Fixes to post-process materials with stencil test:
- Fix operand order of manual stencil test used when Nanite renders custom depth (reference value should be on the left hand side)
- Force compositing of a post-process material's output with the input when manual stencil test is enabled to fix corruption in discarded regions.

#rb brian.karis
#jira UE-192207

[CL 27263260 by jamie hayes in ue5-main branch]
2023-08-22 00:29:21 -04:00
sebastien hillaire
1a7b0e0f71 Substrate - Unlit BSDF support weigth operator and goes though the Strata tree.
#rb none
[FYI] charles.derousiers

[CL 26207324 by sebastien hillaire in ue5-main branch]
2023-06-23 05:57:15 -04:00
Sebastien Hillaire
6f058da7c5 Substrate - bring back proper premultipled alpha that can be toggle on materials and material instances.
- Coverage over the background can be override from the root node when AlphaCompiste blend mode is selected. If not plugged in, coverage of over brackground is off and regular blending is used.
 - Decals only support translucent, composite and modulate. Normal is ignored when using CompositeAlpha (seen somewhere)
 - Light functions can only be opaque so nothing to do in this case.
 - UI domain tested with all blend mode
 - Material attribute aslo tested
 - Fixed many of issues with blend mode defines, being forced, etc.


#rb soon charles.derousiers
#preflight https://horde.devtools.epicgames.com/job/64426db6641e2c3cb4fc7966
#fyi charles.derousiers

[CL 25143802 by Sebastien Hillaire in ue5-main branch]
2023-04-21 07:37:40 -04:00
Sebastien Hillaire
446e8c548a Substrate - shader compiliation optimisation using memeber function instead of inout involving too many registers to deal with.
#rb none
#preflight https://horde.devtools.epicgames.com/job/642aa74c6a37fb35e9a10d1e
#fyi laura.hermanns, charles.derousiers

[CL 24890650 by Sebastien Hillaire in ue5-main branch]
2023-04-03 06:52:28 -04:00
jamie hayes
ee7a64c5b3 - Implement "WPO Disable Distance" for non-Nanite static meshes, and unify FMaterialVertexParameters.bEvaluateWorldPositionOffset for all vertex factories
- Add instance draw distance and global clip plane culling to GPU instance culling and VSM culling shaders to prevent VS invocations for invisible instances.
- Additional clean-up to GPU Scene data and culling code.

#rb ola.olsson
#preflight 640a5bf67e654e2e6543a98c

[CL 24584209 by jamie hayes in ue5-main branch]
2023-03-09 17:51:49 -05:00
jamie hayes
e54c43ad9b [Backout] - CL24579289 and CL24579327
Original CL Desc
-----------------------------------------------------------------
- Implement "WPO Disable Distance" for non-Nanite static meshes, and unify `FMaterialVertexParameters.bEvaluateWorldPositionOffset` for all vertex factories
- Add instance draw distance and global clip plane culling to GPU instance culling and VSM culling shaders to prevent VS invocations for invisible instances.
- Additional clean-up to GPU Scene data and culling code.

#rb ola.olsson
#preflight 6407c662ba12ba6416b8245b

[CL 24581209 by jamie hayes in ue5-main branch]
2023-03-09 15:30:06 -05:00
jamie hayes
7e580ef63c - Implement "WPO Disable Distance" for non-Nanite static meshes, and unify FMaterialVertexParameters.bEvaluateWorldPositionOffset for all vertex factories
- Add instance draw distance and global clip plane culling to GPU instance culling and VSM culling shaders to prevent VS invocations for invisible instances.
- Additional clean-up to GPU Scene data and culling code.

#rb ola.olsson
#preflight 6407c662ba12ba6416b8245b

[CL 24579289 by jamie hayes in ue5-main branch]
2023-03-09 13:34:35 -05:00
Tiantian Xie
90a003b085 Add postprocess material and MRQ support for path tracing buffers.
1. Postprocess can access path tracing buffers (raw/denoised radiance, albedo, normal, variance) with unique material node `PathTracingBufferTexture`.
2. Output in MRQ is also supported.

#jira UE-175664
#rb chris.kulla
#preflight 63fc2a98dd78dd50f655431d

[CL 24419817 by Tiantian Xie in ue5-main branch]
2023-02-26 23:11:38 -05:00
Sebastien Hillaire
3c4c1ea0e2 Strata - unlit BSDF is now sanitized to match legacy behavior.
#jira UE-173359
#rb none
#preflight none
#fyi charles.derousiers

[CL 23625215 by Sebastien Hillaire in ue5-main branch]
2023-01-10 06:46:47 -05:00
jamie hayes
38657d35af Add ability to render Nanite in the Custom Depth Stencil pass. (Redo of 23530212 with a fix for a bug that caused excess compilation of post process material pixel shaders)
#rb brian.karis
#jira UE-158882, FORT-543341
#preflight 639c87eac16855964dcb70ef

[CL 23542238 by jamie hayes in ue5-main branch]
2022-12-16 17:24:59 -05:00
bob tellez
e1bd081c8f Merging CL#23536327
[Backout] - CL23530212
[FYI] jamie.hayes
Original CL Desc
-----------------------------------------------------------------
Add ability to render Nanite in the Custom Depth Stencil pass.

#rb brian.karis
#jira UE-158882, FORT-543341
#preflight 639a0b3d776b61ba3babb355

[CL 23536627 by bob tellez in ue5-main branch]
2022-12-16 05:05:41 -05:00
jamie hayes
fa667b63f5 Add ability to render Nanite in the Custom Depth Stencil pass.
#rb brian.karis
#jira UE-158882, FORT-543341
#preflight 639a0b3d776b61ba3babb355

[CL 23532634 by jamie hayes in ue5-main branch]
2022-12-15 17:03:27 -05:00
Laura Hermanns
3e273da3f6 Fix implicit truncation in PostProcessMaterialShader.usf.
#rb none
#fyi Charles.deRousiers
#jira UE-172499
#preflight none
#rnx

[CL 23481928 by Laura Hermanns in ue5-main branch]
2022-12-12 15:28:52 -05:00
Charles deRousiers
cb8f9f6f00 Add postprocess material support for Strata mobile.
#rb none
#jira none
#preflight shader
#fyi sebastien.hillaire

[CL 23246345 by Charles deRousiers in ue5-main branch]
2022-11-23 02:20:30 -05:00
Dmitriy Dyomin
aa56f25356 Support GBuffer access for translucency with mobile deferred shading enabled (GL does not work atm)
Cleanup sub-pass features usage in mobile shaders
#jira none
#rb wei.liu
#preflight 6357b44736767b3e1e59e0e7

[CL 22748504 by Dmitriy Dyomin in ue5-main branch]
2022-10-25 06:26:40 -04:00
Wei Liu
06c9a5c84e 1. Remove all flip-y completely and only flip y at the end on androidl GL with a native window api, no need to handle flip-y on high level.
2. Supports CustomDepth in translucency pass on mobile LDR.

#jira none

#rb Dmitriy.Dyomin
#preflight 62be9894d94b57687c68aed1

[CL 20911586 by Wei Liu in ue5-main branch]
2022-07-01 03:38:17 -04:00
tim doerries
3b56200e8d Fix for PostProcess Materials set to "OutputAlpha=False" outputting fully transparent images instead of opaque.
#jira FORT-451157
#rb kevin.ortegren, guillaume.abadie, matt.hoffman
#rnx
#preflight 6299fb812a610ccde503ac5a

[CL 20555664 by tim doerries in ue5-main branch]
2022-06-08 09:43:18 -04:00
Wei Liu
f85fb2c6f3 Fix a cook failure on android.
#jira none

#rb Dmitriy.Dyomin
#preflight 627bbd7f9f7ad2a14b63ff00

[CL 20139131 by Wei Liu in ue5-main branch]
2022-05-11 10:08:44 -04:00
Wei Liu
355707489e Refactor of mobile custom depth/stencil to line up with pc on all mobile platform.
#jira none

#rb Dmitriy.Dyomin
#fyi Serge.Bernier
#preflight 627b87a65d003338d95018bf

[CL 20135905 by Wei Liu in ue5-main branch]
2022-05-11 06:10:52 -04:00
Sebastien Hillaire
cbe8136535 Added support for strata post process blend mode.
#rb none
#preflight none
#fyi charles.derousiers

[CL 19243774 by Sebastien Hillaire in ue5-main branch]
2022-03-03 10:05:56 -05:00
Sebastien Hillaire
fd3899ba19 Conversion of post process and light function to dedicated nodes with auto set domain.
#rb none
#fyi charles.derousiers
#preflight 6220a0e47e0217a606e837f1
https://horde.devtools.epicgames.com/job/6220a0e47e0217a606e837f1

[CL 19242057 by Sebastien Hillaire in ue5-main branch]
2022-03-03 07:05:58 -05:00
Charles deRousiers
a02d41c4ee Renamed PROJECT_STRATA into STRATA_ENABLED.
This avoids to define STRATA_ENABLED as 'env. define' for all global shaders needing a Strata specific path.

#rb none
#jira none
#fyi sebastien.hillaire
#preflight 62151b25797dbbeb472ae2eb

[CL 19074999 by Charles deRousiers in ue5-main branch]
2022-02-22 12:35:58 -05: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
serge bernier
9bd5dd217f Make the fetching of the Stencil/depth in the PostProcessMaterial datadriven instead of just testing the feature level. This enable some consoles using the mobile renderer to still have the possibility to use the HiStencil and fetch directly the stencil buffer in the shader.
#jira UE-139942#rb
#rb florin.pascu

#preflight Main

#ROBOMERGE-OWNER: serge.bernier
#ROBOMERGE-AUTHOR: serge.bernier
#ROBOMERGE-SOURCE: CL 18795109 via CL 18795681 via CL 18795876 via CL 18801655 via CL 18802214
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)
#ROBOMERGE-CONFLICT from-shelf

[CL 18808079 by serge bernier in ue5-main branch]
2022-02-01 09:47:39 -05:00