Commit Graph

45 Commits

Author SHA1 Message Date
Rolando Caloca
059213b569 UE4 - Help track down a crash while rendering per object shadows (UE-14193)
[CL 2525002 by Rolando Caloca in Main branch]
2015-04-24 17:27:27 -04:00
Gil Gribb
e631ac5ea3 UE4 - support for dithered LOD transitions on static meshes (that don't move) -- also fixed parallel render thread updates for spline meshes
[CL 2524405 by Gil Gribb in Main branch]
2015-04-24 11:20:23 -04:00
Marc Audy
a523efb225 Fix shadowed variables
[CL 2510461 by Marc Audy in Main branch]
2015-04-13 12:42:09 -04:00
Daniel Wright
6a2bc9ab1a Stationary lights with many unbuilt objects now fall back to CSM on a frame by frame basis
* This fixes the bug where many unbuilt interactions during registration would get corrected by blueprint construction scripts but the stationary light would continue to think it was built

[CL 2496244 by Daniel Wright in Main branch]
2015-03-30 17:38:39 -04:00
Daniel Wright
da0fb3c6b3 Integrate - Added r.Shadow.TexelsPerPixelSpotlight so spotlight shadow resolution can be controlled separately from per-object shadows
[CL 2466525 by Daniel Wright in Main branch]
2015-03-02 13:07:40 -05:00
Allan Bentham
53b8d22820 CSM fixes for forward renderer
MAX_FORWARD_SHADOWCASCADES is correctly defined for OutEnvironment.
 Only render shadow maps that have been successfully allocated texture space.
 fwd shader can deal with full range of MAX_FORWARD_SHADOWCASCADES.
 limit shadow map renders to no more than MAX_FORWARD_SHADOWCASCADES.
 reduce shadow map size to ensure all tiles fit within GMaxShadowDepthBufferSize.
Fixes UE-10282.
#codereview nick.penwarden, Rolando.Caloca

[CL 2466184 by Allan Bentham in Main branch]
2015-03-02 08:00:04 -05:00
Nick Penwarden
dda46ff68e Fix a few issues with self-shadow only.
1) Preshadows for self-shadow only primitives now correctly mask by the receiver and not the subject.
2) Self-shadow only objects are no longer included in whole scene shadows (view dependent whole scene shadows already worked).

#codereview Martin.Mittring,Daniel.Wright

[CL 2436763 by Nick Penwarden in Main branch]
2015-02-07 11:26:51 -05:00
Nick Penwarden
5cc80a152a Move parameters for computing screen space scales to the View and fix the case of negative scaling in the projection matrix
[CL 2427139 by Nick Penwarden in Main branch]
2015-01-31 14:20:00 -05:00
Daniel Wright
21268feedb Stationary lights with CastDynamicShadows disabled no longer do dynamic shadow setup
[CL 2424096 by Daniel Wright in Main branch]
2015-01-29 13:38:57 -05:00
Michael Trepka
40e3a9eb0b Fixed Clang compile error
#codereview Martin.Mittring

[CL 2418566 by Michael Trepka in Main branch]
2015-01-26 09:27:33 -05:00
Martin Mittring
9ffc76cb66 cleanup/simplified shadow rendering code
#code_review:Peter.Knepley

[CL 2418144 by Martin Mittring in Main branch]
2015-01-25 14:16:38 -05:00
Martin Mittring
8fcc979523 shadow projection code cleanup, single constructor, accessor functions for some members
[CL 2418138 by Martin Mittring in Main branch]
2015-01-25 13:58:27 -05:00
Martin Mittring
597a3599eb refactor shadow projection code
[CL 2417411 by Martin Mittring in Main branch]
2015-01-23 17:48:57 -05:00
Martin Mittring
f6f6215e4b added far shadow cascade feature
per scene primitive checkbox, default is on for landscape
 directional light property FarShadowCascadeCount and FarShadowDistance
 todo: ray traced distance field shadows don't fade with it yet, non landscape objects makes with far should be excluded from ry traced distance field

[CL 2416911 by Martin Mittring in Main branch]
2015-01-23 11:17:06 -05:00
Martin Mittring
9e4d2b6140 fixed long range shadows with large terrains
[CL 2416204 by Martin Mittring in Main branch]
2015-01-22 20:21:43 -05:00
Martin Mittring
83eb5e702e refactor shadow code
[CL 2411480 by Martin Mittring in Main branch]
2015-01-19 17:34:22 -05:00
Martin Mittring
75aad5d31f refactor some shadow code
[CL 2411333 by Martin Mittring in Main branch]
2015-01-19 15:55:17 -05:00
Daniel Wright
57721a6245 Distance Field Global Illumination first working version
* Requires a Movable Skylight + 'r.DistanceFieldGI 1' + 'r.GenerateMeshDistanceFields' project setting enabled
* Provides a single bounce of Diffuse GI with bounce distance limited by OcclusionMaxDistance (default 6m)
* Virtual Point Lights are placed from the directional light by ray tracing the scene's distance fields, normal comes from SDF gradient
* Currently only placing 128*128 VPLs up to 40m from camera
* VPLs light irradiance cache samples using hemispherical disk light model, indirect shadowing is provided by the same cone traces used for Distance Field AO
* Irradiance is computed only at irradiance cache points (max every 8 pixels) and interpolated to the rest of the pixels
* Hardcoded half grey material color for now, and poor performance due to brute force VPL lighting

[CL 2390645 by Daniel Wright in Main branch]
2014-12-16 20:00:22 -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
Gil Gribb
89ad70df9d Merging development branch (CL 2365488) to //depot/UE4/... Engine only, mostly hierarchical foliage
[CL 2376199 by Gil Gribb in Main branch]
2014-12-04 12:41:25 -05:00
Matthew Griffin
f1c4513760 Renaming FVector ClampSize and SafeNormal functions for clarity
Used DEPRECATED Macro to keep old names around in case I've missed anything

[CL 2370785 by Matthew Griffin in Main branch]
2014-11-26 10:01:12 -05:00
Daniel Wright
b4c700abeb Removed DrawDynamicElements, PreRenderView and dependencies. These have been disabled since 11/04, and the GetDynamicMeshElements path is now the only path for dynamic mesh rendering.
[CL 2370254 by Daniel Wright in Main branch]
2014-11-25 17:56:43 -05:00
Daniel Wright
8ad4d7e4c7 GPU object management of distance field meshes, can handle 100x more meshes with only a small GPU cost for culling. CPU uploads scene change deltas only, nothing per frame.
New primitive component setting bAffectDistanceFieldLighting, useful for grass whose instance count overwhelms DFAO
Distance field volume texture allocations are sorted by size for better packing, and atlas is repacked on texture reallocation

[CL 2368153 by Daniel Wright in Main branch]
2014-11-21 22:32:16 -05:00
Daniel Wright
406cbf99b7 Only gather dynamic mesh elements for shadows when cvar is enabled
[CL 2355344 by Daniel Wright in Main branch]
2014-11-10 19:49:45 -05:00
Daniel Wright
70ff2bff24 Raised default shadowmap resolution to 2048
* Translucent shadows are now half res compared to opaque shadows, to keep memory usage under control
* New memory usage is 8mb for ShadowDepthZ, 8mb for PreshadowCache, 8*2mb for translucent shadow targets (unchanged), 12mb for largest cubemap shadowmap

[CL 2354996 by Daniel Wright in Main branch]
2014-11-10 15:40:54 -05:00