Commit Graph

7754 Commits

Author SHA1 Message Date
sebastien hillaire
4f274d1ef3 Substrate - Rename/move file(s)
#rb none
[FYI] charles.derousiers

[CL 27514986 by sebastien hillaire in ue5-main branch]
2023-08-31 04:47:50 -04:00
charles derousiers
8f594698e2 Improve base pass shader cost with Substrate with DXC forcing unrolling now shader compilation time is in better shape.
#rb none
[FYI] sebastien.hillaire

[CL 27514973 by charles derousiers in ue5-main branch]
2023-08-31 04:47:39 -04:00
krzysztof narkowicz
1126db0032 Lumen Hardware Ray Tracing - disable RAY_FLAG_FORCE_NON_OPAQUE when it's not needed, as it's only used for a short distance from the surface in order to skip back faces in some tracing methods.
Console, FortGPUTestBed
ScreenProbeGather: 4.18ms -> 4.14ms
Reflections: 2.89ms -> 2.75ms

[CL 27514943 by krzysztof narkowicz in ue5-main branch]
2023-08-31 04:46:58 -04:00
tiantian xie
8d460906fd Fix multi-channel variance output error for path tracing when r.PathTracing.Denoiser.Prepass.VarianceType is set to 0.
#rb trivial

#ushell-cherrypick of 27454998 by Tiantian.Xie

[CL 27514932 by tiantian xie in ue5-main branch]
2023-08-31 04:46:51 -04:00
rune stubbe
227c88a5da Wrap GroupID for Nanite transcode to fix decoding issues when more than 65k clusters are trancoded at once
#rb ola.olsson
[FYI] graham.wihlidal, brian.karis, jamie.hayes

[CL 27514927 by rune stubbe in ue5-main branch]
2023-08-31 04:46:42 -04:00
sebastien hillaire
09ef6f1c14 Substrate - Rename/move file(s) for shader folder only.
#rb none
[FYI] charles.derousiers

[CL 27514918 by sebastien hillaire in ue5-main branch]
2023-08-31 04:46:35 -04:00
jian ru
9f143ae28c Add support for rendering shadows for multiple Lumen lights in a single RDG pass to reduce RDG overhead
#rb krzysztof.narkowicz, zach.bethel

[CL 27511574 by jian ru in ue5-main branch]
2023-08-30 22:33:45 -04:00
jamie hayes
3b2a28806a Fix for spline mesh rendering bugs on mobile platforms with GPU Scene enabled.
[CL 27508763 by jamie hayes in ue5-main branch]
2023-08-30 19:49:03 -04:00
hellokenlee
f92b3683df PR #10788: Fixed undefined RasterizerOrderedTexture2D in Vulkan
#rb Mihnea.Balta
#jira UE-193663
#rnx

[CL 27504726 by hellokenlee in ue5-main branch]
2023-08-30 18:18:28 -04:00
sebastien hillaire
bbc5a450fc Substrate
- Legacy shading model node can now be used as a regular node.
- We can have multiple legacy shading model node in a isngle material now.
- There is now a ShadinModel drop down on the node that is used when the ShadingModel input is not plugged in
- Material instance shading model override is now accounted for by the legacy shading model node. Overriden from the HLSLTranslator when detected.


The data flow now for legacy mateiral conversion is as such:

--- Conversion time - UMaterial::ConvertMaterialToStrataMaterial()
Shading model => legacy node setup (shading model from expression: relink input, otherwise: set shading model on the conversion node)

--- GatherStrataMaterialInfo
Send back what is the shadingmodel used (or if it is "from expression")

--- UMaterial::RebuildShadingModelField()
Set material Domain, ShadingModel and ShadingModels according ot the returned value (FromExpression, etc.) from GatherStrataMaterialInfo.
Those values are not authorable but do enable shading models via defines from the HLSLTranslator. Seeing them being correct also helps to understand and debug.

--- Material instance shading model override
Overriden from the HLSLTranslator when detected.



#rb charles.derousiers

[CL 27504675 by sebastien hillaire in ue5-main branch]
2023-08-30 18:17:58 -04:00
rune stubbe
bccf39e9bc Implemented support for Nanite streaming pool larger than 2GB when it is supported by the hardware.
Fixed NANITE_SANITY_CHECK_STREAMING_REQUESTS path so it compiles again and reduced size of Magic to make room for wider page indices.
Changed independent coding of PageIndex and ClusterIndex in FVisibleCluster to a smaller combined encoding.
Added more descriptive error messages when running out of pool space.
#rb graham.wihlidal
[FYI] brian.karis, jamie.hayes

[CL 27504613 by rune stubbe in ue5-main branch]
2023-08-30 18:17:10 -04:00
sebastien hillaire
d8068daadf Added local fog volume common file.
#rb none

[CL 27487311 by sebastien hillaire in ue5-main branch]
2023-08-30 12:16:23 -04:00
massimo tristano
520da29934 Backed out part of my Material Translation DDC change due to a GPU hang. I will reintroduce this change in separate smaller submits gradually to identify the cause.
#jira UE-167483
#rb jon.cain

[CL 27480884 by massimo tristano in ue5-main branch]
2023-08-30 07:01:16 -04:00
patrick kelly
232d152b45 Heterogeneous Volumes: Fixes flickering when rendering without the lighting cache
#rb stu.mckenna
#jira UE-194186

[CL 27471054 by patrick kelly in ue5-main branch]
2023-08-29 19:08:09 -04:00
patrick kelly
14c30983cb Dead code removal
#rb none
[FYI] chris.kulla

[CL 27464925 by patrick kelly in ue5-main branch]
2023-08-29 16:45:42 -04:00
patrick kelly
4001fa041d PathTracing: Correctly support mixing of HeterogeneousVolumes with SkyAtmosphere and HeightFog.
#rb chris.kulla
#jira UE-193867

[CL 27457573 by patrick kelly in ue5-main branch]
2023-08-29 14:26:30 -04:00
patrick kelly
ab0d0a1872 Fixes to Majorant grid build
#rb chris.kulla
#jira UE-193872

[CL 27428461 by patrick kelly in ue5-main branch]
2023-08-28 18:09:10 -04:00
xujie chen
20d86bdd33 Debug Visualization: Anyhitshader count, count the number of triangles hit per ray, and generate a heatmap for them
#rb tiago.costa, Tiantian.Xie, aleksander.netzel

[CL 27419469 by xujie chen in ue5-main branch]
2023-08-28 14:49:34 -04:00
xujie chen
be77d38c4e Lumen hit lighting performance optimization. Reduced SortTracesByMaterialCS running time by 80%.
#jira
#rb Krzysztof.Narkowicz

[CL 27418128 by xujie chen in ue5-main branch]
2023-08-28 14:10:07 -04:00
yuriy odonnell
5d007d1ca8 Iinstance culling occlusion query optimizations
* Only ever process instances that pass the CPU-side culling
* Use R8_UINT format for the instance visibility mask

#rb Jeremy.Moore

[CL 27399142 by yuriy odonnell in ue5-main branch]
2023-08-25 22:37:41 -04:00
jeannoe morissette
235b6cbfd3 VulkanRHI: Actually enable scalar_block_layout in raytracing and sm6 shaders to fix multiple alignment issues. Rename ReflectionSlot param to align with ShaderCommon code.
#rb carl.lloyd
#jira UE-171798
#rnx

[CL 27399055 by jeannoe morissette in ue5-main branch]
2023-08-25 22:19:15 -04:00
carl lloyd
34d53bc691 Added validation to ensure UAV/SRV types and UB sizes match the ones generated by the shader compiler
#rb jeannoe.morissette
#jira UE-82353

[CL 27399050 by carl lloyd in ue5-main branch]
2023-08-25 22:19:10 -04:00
guillaume abadie
d59499b3a3 Concatenates the convolutions of the TSR rejection's blend and clamp to save perf
#rb none
#jira UE-179496

[CL 27386517 by guillaume abadie in ue5-main branch]
2023-08-25 14:41:22 -04:00
guillaume abadie
9f963239c8 Implements UMaterial::bHasPixelAnimation
TSR's anti-flickering heuristic (r.TSR.ShadingRejection.Flickering=1) analyses how opaque pixels changes overtime and whenever the period of changes get lower than r.TSR.ShadingRejection.Flickering.Period, the heuristic tries to stabilise the pixel by relaxing the rejections.

The problems this creates is that any fast moving texture paning and other pixel animation made in material might looks identically flickering to TSR, because not knowing the motion of the pixels animations. TSR currently not having optical flow yet, the artists needs a way to say that the velocity buffer containing the geometric velocities used for reprojection actually exclude pixel animations.

This changes implements UMaterial::bHasPixelAnimation the artists can define on opaque geometry. It end up encoded forcing the primitive to draws velocity so that bit can be encoded in velocity buffer when VELOCITY_ENCODE_DEPTH==1 because there is no room left in stencil or gbuffer, and this has the advantage to works for both forward and deferred shading renderer.

This gets passdown to shaders through in the primitive uniform parameters so that nanite global shaders FEmitSceneDepthPS and FDepthExportCS can encode it when writing out velocity. It also allows to not need to compile additional material shader permutation of FVelocityPS for non masked opaque geometry. But this causes the limitation currently that any primitive that have at least one shader with this setting enabled will force the entire primitive's material slots to draw this bit in the velocity.

TSR in turn disables it's r.TSR.ShadingRejection.Flickering=1 heuristic on any pixel that have it sets using DecodeHasPixelAnimationFromVelocityTexture().

The flag can be visualized by artists with the VisualizeTemporalUpscaler show flag.

#rb jeremy.moore
#jira UE-187459

[CL 27385162 by guillaume abadie in ue5-main branch]
2023-08-25 14:12:42 -04:00
jon cain
09a47bb166 Converted TSR and SSD relevant passes to utilise the Orthographic helper functions.
Moved the WorldDepthToPixelRadius calculation to view buffer.
SSD changes are mostly a refactor as they were already compensating for the ortho branching.
NOTE: This is missing the required change for the depth plane, so artifacts will be present with the current default Ortho camera far plane (UE_OLD_WORLD_MAX). If you reduce the far plane to 100,000 it should resolve it, 10,000 seems to be a sweet spot. This will be resolved in a future CL.


#jira UE-184615
#rb Guillaume.Abadie

[CL 27385146 by jon cain in ue5-main branch]
2023-08-25 14:12:32 -04:00