Commit Graph

31 Commits

Author SHA1 Message Date
Guillaume Abadie
cbeddee7e1 Changes some variable names in the view uniform buffer.
ViewWorldOrigin -> WorldViewOrigin
CameraWorldOrigin -> WorldCameraOrigin
CameraTranslatedWorldOrigin -> TranslatedWorldCameraOrigin
CameraWorldOriginDelta -> WorldCameraMovementSinceLastFrame
PrevCameraWorldOrigin -> PrevWorldCameraOrigin
PrevViewWorldOrigin -> PrevWorldViewOrigin

#code_review: Martin.Mittring

[CL 2666624 by Guillaume Abadie in Main branch]
2015-08-24 16:27:34 -04:00
Guillaume Abadie
5dd619f8f6 Exposes the view space and the camera space in the transform material expressions
#code_review: Daniel.Wright

[CL 2665951 by Guillaume Abadie in Main branch]
2015-08-24 09:53:28 -04:00
Brian Karis
5db784840f Fixed clear coat bugs.
Fixed clear coat when sky but no reflection captures are present.

Fixed clear coat values were between 0 and 1 going gray.

[CL 2639167 by Brian Karis in Main branch]
2015-07-30 15:00:43 -04:00
Daniel Wright
e22a2fef62 Removed unused shader code
[CL 2602526 by Daniel Wright in Main branch]
2015-06-26 13:17:53 -04:00
Daniel Wright
b24b3274b1 Skylight cubemap blending
* New Blueprint function for creating sky lighting from a blend of two cubemaps - SetCubemapBlend
* Diffuse sky lighting is blended on the CPU, specular is blended per-pixel with an extra cubemap lookup until the blend fraction becomes 0 or 1
* Skylight capture still blocks on the GPU for readback but not the rendering thread.  This happens when a new source or destination cubemap is requested with SetCubemapBlend.

[CL 2601116 by Daniel Wright in Main branch]
2015-06-25 15:45:00 -04:00
Martin Mittring
ef2256631b updated LightPropagationVolume (from Lionhead Studios)
* reduced order of SH (faster but a bit more blurry)
* DirectionalOcclusion (disabled by default, can be enabled in PostProcessSettings, affects SkyLight and ReflectionEnvironments but not AmbientCube)
* Material BlockGI feature
* Spotlight support
* Uses AsyncCompute on XboxOne as optimization (order is not optimized yet)

[CL 2553823 by Martin Mittring in Main branch]
2015-05-15 18:54:37 -04:00
Gil Gribb
35cf42566a UE4 - merge GDC branch, code @2465640 to main
[CL 2468685 by Gil Gribb in Main branch]
2015-03-04 08:31:40 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Daniel Wright
c9edd58ad3 Improved sky specular occlusion for the TwoSidedFoliage shading model - applies AO directly instead of doing the reflection cone vs bent normal intersection.
[CL 2368152 by Daniel Wright in Main branch]
2014-11-21 22:32:03 -05:00
Rolando Caloca
ff52d17769 UE4 - Fixed reflection captures on ES2
[CL 2298835 by Rolando Caloca in Main branch]
2014-09-15 17:57:54 -04:00
Rolando Caloca
42b7dfcecb UE4 - Revert Reflection captures changes
[CL 2298631 by Rolando Caloca in Main branch]
2014-09-15 15:52:29 -04:00
Rolando Caloca
29c68f2eec UE4 - Cascaded shadow maps on mobile/forward
* Still disabled as Metal requires a horrible workaround/hack
* Remove GSupportsGSRenderTargetLayerSwitchingToMips workaround

[CL 2295640 by Rolando Caloca in Main branch]
2014-09-12 17:21:49 -04:00
Daniel Wright
c338f80866 Reflection Environment uses standard deferred application which has a low constant cost, until the number of captures exceeds 'r.TiledReflectionEnvironmentMinimumCount', where it switches to tiled deferred.
* The threshold is currently 0, as clear coat has not been implemented with the standard deferred path

[CL 2293140 by Daniel Wright in Main branch]
2014-09-10 19:20:06 -04:00
Daniel Wright
fe11711228 SM4 feature level now supports reflection captures on translucency
Fixed bug with skylight reflections blending into reflection captures on translucent materials

[CL 2283831 by Daniel Wright in Main branch]
2014-09-03 21:16:20 -04:00
Daniel Wright
0f5d6b6131 Removed general purpose tweak usage
[CL 2283599 by Daniel Wright in Main branch]
2014-09-03 18:17:31 -04:00
Daniel Wright
4477b992e4 Distance field area shadows
* This new shadow method is computed by cone tracing through the mesh distance fields when the 'bGenerateMeshDistanceFields' project setting is enabled
* It has high pixel cost but low object and triangle cost and is useful for covering a large depth range for a dynamic sun.  It inherits all the limitations of mesh distance fields (no vertex animation, only static meshes supported for now, only uniform scaling).  Components can use an inset shadow to use shadowmapping even while the ray traced shadows are used for the rest of the world.
* Currently only implemented for directional lights, as a final cascade after the shadowmapped cascades
* Current implementation groups pixels in a tile into a far depth range and near, tile culls the objects in the scene with those two groups. ~6ms in AITestBed_2 at 1080p on 7870 with a view range of 200k.
* bAllowMeshDistanceFieldRepresentations project setting renamed to bGenerateMeshDistanceFields

[CL 2283597 by Daniel Wright in Main branch]
2014-09-03 18:17:19 -04:00
Daniel Wright
f5238f04e1 Distance Field AO improvements
* Distance field building is now asynchronous and stored in the DDC separately from static mesh data.
* Added OcclusionMaxDistance and Contrast properties to Movable sky light
* Using the GBuffer normal instead of the generated distance field normal, fixes artifacts on two-sided materials and between modular pieces.  Also saves about .7ms / 4.5ms
* Points in the distance field are only considered 'inside' the mesh if > 50% of all rays traced hit a backface.  Most meshes can have a valid distance field generated with this heuristic.  Meshes without a distance field representation can receive occlusion.
* Fortnite two-sided foliage with world position offset animation works fine now
* Using the resulting bent normal for diffuse lighting, improves consistency in occluded corners
* Resulting bent normal is also used to occlude skylight specular using an approximate cone-cone intersection, prevents leaking where SSR is not available
* Fixed stationary skylights not getting lightmap mixing
* Reflection captures now work with the movable skylight, which adds its diffuse contribution to IndirectIrradiance so their lightmap mixing works
* Added new show flag to visualize mesh distance fields, which ray traces through the distance fields and gives a sense of their shape

[CL 2276435 by Daniel Wright in Main branch]
2014-08-28 13:54:31 -04:00
Daniel Wright
bbffb27aaf Fixed specular on movable skylights
* Removed double normalization from stationary skylight specular

[CL 2239230 by Daniel Wright in Main branch]
2014-07-31 19:39:39 -04:00
Brian Karis
29c87eafd7 Added clear coat shading model. Fixed incorrect reflection capture filtering.
Needs some clean up still. Standard deferred reflections not implemented yet. Tiled deferred reflections needs some optimization. ClearCoat and ClearCoatRoughness needs to be exposed to the material editor.

[CL 2118481 by Brian Karis in Main branch]
2014-06-26 16:40:05 -04:00
Gil Gribb
fa7226b8fe UE4 - merge first pass at parallel rendering to main
[CL 2095959 by Gil Gribb in Main branch]
2014-06-05 16:38:54 -04:00
Brian Karis
c786202246 Renamed Material Lighting Model to Material Shading Model.
[CL 2089198 by Brian Karis in Main branch]
2014-05-30 07:55:38 -04:00
Brian Karis
6e54ecd01f Fixed reflections on SSS materials. Improved reflection renormalization.
[CL 2065905 by Brian Karis in Main branch]
2014-05-07 14:51:05 -04:00
Brian Karis
7b3250e271 Fixed ES2
[CL 2060681 by Brian Karis in Main branch]
2014-04-30 20:50:22 -04:00
Brian Karis
9871b021d7 Fixed dependency. Unbacked out change.
[CL 2060185 by Brian Karis in Main branch]
2014-04-30 14:14:19 -04:00
Bob Tellez
c59bebc734 Back out changelist 2059445. This change introduced a dependency on a shader called "MonteCarlo.usf" in ReflectionEnvironmentShaders.usf which does not exist.
#codereview Brian.Karis

[CL 2059473 by Bob Tellez in Main branch]
2014-04-29 21:59:35 -04:00