Commit Graph

84 Commits

Author SHA1 Message Date
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
ba008b0bdf Fix shadow variables
[CL 2521205 by Marc Audy in Main branch]
2015-04-22 11:37:49 -04:00
Rolando Caloca
9a899d66d4 UE4 - Mobile Preview for feature level ES3.1/Metal (experimental)
[CL 2510893 by Rolando Caloca in Main branch]
2015-04-13 18:00:32 -04:00
Marc Audy
a523efb225 Fix shadowed variables
[CL 2510461 by Marc Audy in Main branch]
2015-04-13 12:42:09 -04:00
Rolando Caloca
ce168f2846 UE4 - Renamed depth compare enums, changed some checks to static_asserts
[CL 2498658 by Rolando Caloca in Main branch]
2015-04-01 10:53:07 -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
Rolando Caloca
cb32891b3c UE4 - Added sanity checks for Inverted/Normal Depth Buffers; use ERHIZBuffer::NearPlane & FarPlane to switch from 0-1 to 1-0 on Depth
- Added shader define HAS_INVERTED_Z_BUFFER
- Added RHIHasInvertedZBuffer()
#codereview Martin.Mittring, Brian.Karis, Nick.Penwarden

[CL 2497481 by Rolando Caloca in Main branch]
2015-03-31 14:02:45 -04:00
Lee Clark
338cc3e4dc Back out changelist 2489395 until we can do some more testing.
[CL 2493524 by Lee Clark in Main branch]
2015-03-27 06:30:36 -04:00
Lee Clark
15c2a3c1a8 Replace manual stencil clear with stencil writing zero during the shadow projection. Saves approx 1ms of GPU in MatineeFightScene on GTX 780.
(https://udn.unrealengine.com/questions/240409/stencil-clear-improvement-in-shadowprojectiononopa.html)

#codereview Daniel.Wright

[CL 2489395 by Lee Clark in Main branch]
2015-03-24 11:38:47 -04:00
Dan Oconnor
06806b2237 PR #946: Fixing PVS-Studio warning (Contributed by PaulEremeeff)
https://github.com/EpicGames/UnrealEngine/pull/946

I have gone through these changes and verified that whatever behavior change they cause could only be an improvement (generally they just prevent possible access to nullptrs, but there are also some style corrections). A separate changelist is being prepared that includes changes that could unintentionally caues behavior change for the worse.

[CL 2486801 by Dan Oconnor in Main branch]
2015-03-20 17:18:31 -04:00
Josh Adams
b0c3bb7424 - Minor high level changes to support Metal (breaking apart SM4 == Geometry shader assumptions, setting Load actions, etc)
#codereview marcus.wassmer

[CL 2484841 by Josh Adams in Main branch]
2015-03-19 14:09:16 -04:00
Daniel Wright
648824ec88 Integrate - View.ViewToTranslatedWorld is now correct for shadow passes, allows billboards to face the light
[CL 2466655 by Daniel Wright in Main branch]
2015-03-02 14:11: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
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
Marcus Wassmer
2cd3355b99 Add MRT clear value binding to the RHI. This allows parallel rendering platforms to propagate clear color values across parallel execution boundaries for platforms which require low level control over hardware clears.
Also add many explicit calls to CopyToResolveTarget to indicate the transition of a render target to be able to be used as an SRV.  Soon to be replaced by a more specific RHI function.
Added r.CheckSRVTransitions for D3D11 on windows to check if any of these transition are missing.
Fixes a bug with RHIThreadFence when using PLATFORM_SUPPORTS_PARALLEL_RHI_EXECUTE
PLATFORM_SUPPORTS_PARALLEL_RHI_EXECUTE on PS4 now supports CMASK and HTILE enabled buffers.
#codereview lee.clark,gil.gribb,rolando.caloca,daniel.wright

[CL 2420986 by Marcus Wassmer in Main branch]
2015-01-27 16:14:50 -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
597a3599eb refactor shadow projection code
[CL 2417411 by Martin Mittring in Main branch]
2015-01-23 17:48:57 -05:00
Martin Mittring
ab2c5b766d easier debugging of shadows
[CL 2416906 by Martin Mittring in Main branch]
2015-01-23 11:09:34 -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
Gil Gribb
0e40876cb0 UE4 - fix UE-6438, missing shadow shaders for instanced static meshes that modify vertex pos. And UE-6439, a crash related to not having a cluster tree at all.
#lockdown Andy.Bayle

[CL 2381973 by Gil Gribb in Main branch]
2014-12-09 13:16:50 -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
e1f9062ae7 UE4 - tweaks to hierarchical foliage. Fix a few bugs in the handling of temporal LOD. Better legacy support. Opaque surfaces working correctly.
[CL 2379451 by Gil Gribb in Main branch]
2014-12-07 13:01:25 -05:00
Michael Noland
8fadce6378 Engine: Replace some color literals with FColor / FColorList entries
[CL 2378046 by Michael Noland in Main branch]
2014-12-05 15:03:26 -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