Commit Graph

6470 Commits

Author SHA1 Message Date
dmitriy dyomin
d7bba4622e Fixed: Use last frame eye adaptation constant instead of sampling EyeAdaptation buffer directly in materials to avoid issue in a MALI GL drivers (r9p0)
#rb wei.liu

[CL 23102279 by dmitriy dyomin in ue5-main branch]
2022-11-11 14:12:54 -05:00
chris kulla
06d780db4b Add implementation of Fresnel F82 curve and fix F_Fresnel logic to clamp SpecularColor correctly
#rb none
#jira none
#preflight shaders

[CL 23101890 by chris kulla in ue5-main branch]
2022-11-11 13:47:04 -05:00
chris kulla
5ed75e222b Path Tracer: Remove PixelCoord from Payload and PixelIndex from PathState
This field is no longer used, which frees up 4 bytes in the payload and in the path state.

#rb Patrick.Kelly
#jira none
#preflight 636d6ab185629dff9115b77c

[CL 23088414 by chris kulla in ue5-main branch]
2022-11-10 17:15:53 -05:00
chris kulla
ffd6adef89 Implement support for PixelDepth shading node for Ray Tracing and Path Tracing shaders
This has a side benefit of not requiring the pixel coordinate to be passed in via the payload. This can be cleaned up in a follow up refactor.

#rb Aleksander.Netzel
#jira none
#preflight 636d3a3885629dff91f7ba90

[CL 23083129 by chris kulla in ue5-main branch]
2022-11-10 13:00:42 -05:00
jeremy moore
fc8ec5d756 Add landscape actor setting for choosing to use high quality per pixel heightmap sampling used with RVT.
Add a per platform CVar to completely disable high quality per pixel heightmap sampling if we want minimal cost.

[CL 23075430 by jeremy moore in ue5-main branch]
2022-11-10 06:33:30 -05:00
ola olsson
fe88f9ad34 Moved VSM page translation cache to a separate groupshared buffer to fix bugs where vertex data is overwritten while still in use.
#rb andrew.lauritzen
[FYI] brian.karis
#preflight none

[CL 23075425 by ola olsson in ue5-main branch]
2022-11-10 06:33:23 -05:00
carl lloyd
52be0e8e77 Fixed bug with deferred decals on OpenGL
#rb Laura.Hermanns
#jira UE-168197
#preflight 636cc9cc376a9cd6a8e9fde3

[CL 23073711 by carl lloyd in ue5-main branch]
2022-11-10 05:06:00 -05:00
aleksander netzel
ecdff9f995 Enable alpha masking in all Lumen HWRT passes:
* We need alpha testing for masked terrain otherwise everything under the masked part will be incorrectly occluded.

#rb krzysztof.narkowicz
#preflight skip

[CL 23071974 by aleksander netzel in ue5-main branch]
2022-11-10 01:15:26 -05:00
andrew lauritzen
4c3a0b4a5b Add and use blue noise for VSM projection to improve performance.
Add ability to adjust the adaptive ray count heuristic to be less aggressive (larger numbers).

#rb ola.olsson
#preflight 636b0282dc30a4ce96cc093e

[CL 23071887 by andrew lauritzen in ue5-main branch]
2022-11-10 01:11:11 -05:00
tiago costa
6c024c4f9d Fix shader compiler issue on Android.
#rb none
#preflight skip

[CL 23069809 by tiago costa in ue5-main branch]
2022-11-09 21:03:45 -05:00
krzysztof narkowicz
7567b4d36a Lumen HWRT Landscape - reuse alpha from the other side of the heightfield, so that Landscape opacity works correctly when viewed from the other side
[CL 23069574 by krzysztof narkowicz in ue5-main branch]
2022-11-09 20:58:15 -05:00
tiago costa
2d960328fe Use translucency volume as fallback when calculating approximate illuminance for auto exposure
- for materials that have diffuse color = 0 there's no usable lighting information in SceneColor
- so fallback to lighting calculated using translucency volume

#rb Krzysztof.Narkowicz
#preflight skip

[CL 23069554 by tiago costa in ue5-main branch]
2022-11-09 20:57:36 -05:00
graham wihlidal
c0b39c2d84 Nanite materials using VT feedback should only ever use [earlydepthstencil], not [ReZ] (Nanite will never have side effects in the material itself like clip() or SV_Depth). Redefined clip to always noop for Nanite (removing CLIP in the process). Also optimized Nanite base pass to always force wave32 regardless of programmable or not.
#rb yuriy.odonnell
[FYI] brian.karis, rune.stubbe, jamie.hayes, ben.woodhouse
#preflight skip

[CL 23069541 by graham wihlidal in ue5-main branch]
2022-11-09 20:57:06 -05:00
jeremy moore
76953fbb8e Use sampling that matches vertex interpolation when sampling per pixel height in landscape.
This fixes the mismatch between rendering landscape to RVT with a single quad and with a high LOD mesh.

[CL 23069485 by jeremy moore in ue5-main branch]
2022-11-09 20:55:49 -05:00
dmitriy dyomin
871943d5a0 Fixed: too strong specular lighting on mobile, since LightColor is no longer pre-multiplied by 1/PI
#rb wei.liu

[CL 23069400 by dmitriy dyomin in ue5-main branch]
2022-11-09 20:53:26 -05:00
Wei Liu
f3cdf501ba Support translucency lighting type on mobile
#jira none

#rb Dmitriy.Dyomin
#preflight 636b86c863037c10269b8e0c

[CL 23050602 by Wei Liu in ue5-main branch]
2022-11-09 06:01:15 -05:00
krzysztof narkowicz
6880cb1bdf Lumen Reflection fixes
* Fixed incorrect blend between rough and mirror reflections when GetDiffuseLerp < 1
* Clamp rough specular lobe to 0.2 roughness (~2x2 footprint in a 16x16 probe) instead of depending on a MaxRoughnessToTrace and reduce difference between rough and mirror reflections
* Tweak GetDiffuseLerp fade region to bring in more of a specular lobe

[FYI] Daniel.Wright

[CL 23049861 by krzysztof narkowicz in ue5-main branch]
2022-11-09 04:11:51 -05:00
jian ru
54159d5c29 Don't clear past the end of groupshared arrays
[CL 23027225 by jian ru in ue5-main branch]
2022-11-08 09:00:54 -05:00
jian ru
9b2403696f Fix a bug where we never compact vertices when it is needed
[FYI] rune.stubbe

[CL 23027223 by jian ru in ue5-main branch]
2022-11-08 09:00:49 -05:00
krzysztof narkowicz
7717219faa Lumen Reflections - fixed clear coat reflections and SSR rough reflection lobe fade
* Restored previous lerp between rough and specular reflections, which is required to properly handle a clear coat. Otherwise (1-FadeAlpha) is incorrectly applied to the clear coat bottom layer.
* This means that experimental r.Lumen.ScreenProbeGather.InjectLightsToProbes specular won't work correctly and needs to be fixed in future
* Fixed too bright SSR reflection fade to rough reflections, which were incorrectly added on top of the rough reflections

#rb Daniel.Wright

[CL 23025378 by krzysztof narkowicz in ue5-main branch]
2022-11-08 04:25:47 -05:00
graham wihlidal
f5881b5337 Optimized Nanite material depth export to support reading compressed Z planes when necessary, and also optimized the cases where a tile is entirely non-Nanite, or a tile mixed with Nanite and non-Nanite has no Nanite fragments survive the depth test against the scene. Put old behavior of decompressing HiZ and only reading uncompressed depth behind a new r.Nanite.DecompressDepth cvar
#rb rune.stubbe
[FYI] brian.karis, luke.thatcher, ben.woodhouse
#preflight skip

[CL 23025368 by graham wihlidal in ue5-main branch]
2022-11-08 04:25:17 -05:00
Charles deRousiers
dc5a7b2431 Remove duplicate of DivideAndRoundUp and move it to Common.ush
#rb none
#jira none
#preflight shaders

[CL 23025229 by Charles deRousiers in ue5-main branch]
2022-11-08 03:45:56 -05:00
Charles deRousiers
551ec5b6dc Add PrintBool to ShaderPrint.
#rb none
#jira none
#preflight shaders

[CL 23025158 by Charles deRousiers in ue5-main branch]
2022-11-08 03:19:53 -05:00
tiago costa
47f8ef5933 Support calculating AutoExposure Illuminance at lower resolution.
#rb Krzysztof.Narkowicz
#preflight skip

[CL 23020979 by tiago costa in ue5-main branch]
2022-11-07 18:17:29 -05:00
krzysztof narkowicz
e4add33abd Lumen - increase surface cache bias on all bMostlyToSided (foliage) objects. This improves surface cache projection on trees, which have a pretty inaccurate SDF and BVH representation.
[CL 23019436 by krzysztof narkowicz in ue5-main branch]
2022-11-07 17:22:37 -05:00