CL 2505532 Moved custom depth checking to CanBeOccluded()
CL 2500364 Don't consider static meshes with precomputed shadows to be dynamic
[CL 2510964 by David Ratti in Main branch]
I have reviewed each change carefully, but it is a large change and I could have missed something! Here is a summary of the types of changes in this CL:
* Made nullptr checks consistent (the plurality of the changes are of this type)
* Completed switch statements (IE, switch did not explicitly handle default case, but had unhandled enum entries - this is the second most popular type of fix)
* Removed unused variables
* Removed redundant initializations
* WidgetNavigationCustomization.cpp was fixed by the owner
* integers converted to floats where result was stored in a float
* Removed redundent null checks (e.g. before delete statements)
* Renamed variables to prevent non-obvious shadowing
* Fixed use of bitwise & when checking for equality to an enum entry (which is often 0)
* Fixes for some copy paste errors (e.g. FoliageEdMode.cpp)
[CL 2498053 by Dan Oconnor in Main branch]
* Enable with 'r.DistanceFieldGI 1' on console
* Surfel GI is currently disabled as it doesn't interop yet
* A GBuffer atlas is created for Landscape from components that can affect indirect lighting based on the current view
* Shadowing from a directional light is computed by reusing shadowmaps and ray tracing distance fields
* Lighting is computed for the atlas using GBuffer properties
* First bounce GI light transfer is computed for a receiver by iterating over all the nearby lit texels of the heightfield and treating them as Virtual Point Lights. Two gather regions are used, the larger one skips through the heightfield to achieve a larger bounce distance. Distance field AO is used to provide local shadowing.
* Material diffuse color not yet supported, and regions outside of the view don't have valid shadowing.
[CL 2436606 by Daniel Wright in Main branch]
Automatically generate grass maps for all components, streaming in textures and weightmaps where needed
Status window when building grass maps
Grass data is now shared between Editor and PIE
Fixed issue where it didn't wait for streaming after updating grass map after painting landscape
[CL 2425895 by Jack Porter in Main branch]
* Disabled by default, need a movable skylight with r.DistanceFieldGI enabled at load time (ConsoleVariables.ini)
* Surfels (oriented disks) are placed on mesh surfaces and capture diffuse color by evaluating the material with actual UVs and world position
* Surfels are lit and shadowed by ray tracing through mesh distance fields (directional light only so far)
* Irradiance cache records are lit with nearby Virtual Point Lights created from lit surfels. Only using camera based LOD of the surfel representation and object based surfel culling, no hierarchy yet.
* Shadowing of the VPLs is provided by distance field cone tracing. A depth visibility function is constructed along each of the 9 cone trace directions, and used to shadow the incoming VPL lighting.
* Component reregistration and transform updating causes surfels to be generated again which can be slow. In the future only the material needs to be re-evaluated.
* Geometry shaders with stream out are now supported, by implementing FShader::GetStreamOutElements
* Compute shaders can now evaluate materal attributes like BaseColor
* SkyLight MaxOcclusionDistance increased to 10m, which is the minimum useful amount for GI
[CL 2424208 by Daniel Wright in Main branch]
* 21ms in GDC level for landscape occlusion down to .12ms
* Also fixed heightfield occlusion from Landscapes with subsections
[CL 2400088 by Daniel Wright in Main branch]
This was mostly caused by rounding to the nearest vertex on multiple LOD transitions, which wasn't stable (On one component in LOD 0, vertex A in LOD 0 would round to vertex B in LOD 1 and vertex C in LOD 2 (vertex C being the nearest to vertex A, not necessarily vertex B), but the next component would be in LOD 1 and so would start with vertex B, and round it to a different LOD 2 vertex)
Partly responsible was also the "DistLOD" hack, because it used different shader code for if LodValues.x (aka "DistLOD") was <1 or >1, so would cause a beautiful seam between components which hit each case
There will still be temporary seams between landscape components that are still streaming their heightmap textures, a solution to that is in the works.
Also:
Removed FLandscapeXYOffsetVertexFactoryVertexShaderParameters and merged it with FLandscapeVertexFactoryVertexShaderParameters to remove a large amount of code duplication, and did some cleanup of LandscapeRender.cpp/.h (e.g. autoformatting)
[CL 2377758 by Gareth Martin in Main branch]