Commit Graph

10 Commits

Author SHA1 Message Date
Daniel Wright
bfd7b3736c Distance field primitive updates no longer infinitely accumulate when distance field features are disabled
Distance field scene updates are no longer tracked when the project setting r.GenerateMeshDistanceFields is disabled

[CL 2519945 by Daniel Wright in Main branch]
2015-04-21 16:33:23 -04:00
Mike Fricker
114458bf0f Clang warning fixes: Fixed missing 'override' specifiers
- Also removed some unreferenced functions that adding 'override' revealed

PR #1002 -- Thank you, Omar007!

[CL 2498415 by Mike Fricker in Main branch]
2015-04-01 07:20:55 -04:00
bruce nesbit
cd6f26cc24 Fixed compile error in DistanceFieldObjectManagement.cpp
#codereview Daniel.Wright

[CL 2496839 by bruce nesbit in Main branch]
2015-03-31 02:49:33 -04:00
Daniel Wright
9d572e0238 Distance field AO and Ray traced shadows on PS4. DFAO costs nearly 4ms in a mostly empty map so needs a lot of optimization.
* Added r.AOHistoryDistanceThreshold with default to 20, can be tweaked to avoid ghosting behind characters while not causing too much flickering
* Distance fields are now culled to each surface cache record before ray tracing for AO, saves a bit of GPU time

[CL 2496263 by Daniel Wright in Main branch]
2015-03-30 17:48:16 -04:00
Daniel Wright
6b46e989d7 Integrate - Logs to help track down DF hitching
[CL 2452210 by Daniel Wright in Main branch]
2015-02-19 16:20:29 -05:00
Daniel Wright
f8dd79712e Fix non-unity error
[CL 2436818 by Daniel Wright in Main branch]
2015-02-07 13:43:44 -05:00
Daniel Wright
d05993f885 Heightfield dynamic Global Illumination
* 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]
2015-02-06 23:31:19 -05:00
Daniel Wright
a4aeebd256 Fixed incorrect usage of mem stack
[CL 2428574 by Daniel Wright in Main branch]
2015-02-02 15:02:22 -05:00
Bart Bressler
69bc44efb8 Non-unity compile fix
[CL 2428282 by Bart Bressler in Main branch]
2015-02-02 12:03:53 -05:00
Daniel Wright
ba3963fcaf Surfel Global Illumination with Distance Field shadowing
* 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]
2015-01-29 14:46:20 -05:00