Commit Graph

48 Commits

Author SHA1 Message Date
Martin Mittring
f4c64b506c renamed some class members to be more clear
[CL 2510786 by Martin Mittring in Main branch]
2015-04-13 17:01:36 -04:00
Marcus Wassmer
ac56844346 Add permutations to various global shaders to compile out ClearCoat handling if there are no clearcoat materials in the given view.
Also FViewInfo now accumulates a mask of all lightingprofiles used in a given view during the relevancy calculation.
#codereview daniel.wright,martin.mittring

[CL 2505772 by Marcus Wassmer in Main branch]
2015-04-08 16:15:25 -04:00
Martin Mittring
a576df51f9 now SetRenderTarget requires to specify what DepthAndStencil access you want to do e.g. FExclusiveDepthStencil::DepthRead_StencilWrite
options:   Nop / Read / Write

added ensure() and check() to find bad usage patterns

this fixes DBuffer decal rendering, allows optimizations in the RHI (near hardware APIs like DX12 or consoles)

[CL 2505694 by Martin Mittring in Main branch]
2015-04-08 15:33:28 -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
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
459cf41c81 Integrate - Skylight MinOcclusion works on sky specular occlusion as well
[CL 2452221 by Daniel Wright in Main branch]
2015-02-19 16:22:43 -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
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
1ac2fdb3df Added r.SkySpecularOcclusionStrength to tweak DFAO influence on sky specular
[CL 2369038 by Daniel Wright in Main branch]
2014-11-24 17:39:52 -05:00
Rolando Caloca
d8a576970e UE4 - Remove Color parameter on draw events (DEC_*)
[CL 2334566 by Rolando Caloca in Main branch]
2014-10-20 10:43:43 -04:00
Allan Bentham
7cb74a5cc5 Added PreFeatureLevelSwitch() to scene component
Reflection captures work with feature level preview switching.
removed 'r.NoTiledReflections' support.
#codereview nick.penwarden

[CL 2319780 by Allan Bentham in Main branch]
2014-10-06 10:06:04 -04:00
Graeme Thornton
3ccbe19544 Mobile Preview - Removal of almost all GRHIFeatureLevel usages.
#codereview Nick.Pendwarden

[CL 2315798 by Graeme Thornton in Main branch]
2014-10-01 09:08:51 -04:00
Niklas Smedberg
bb8f417304 Support for OpenGL ES 3.1 + Android Extension Pack
[CL 2303212 by Niklas Smedberg in Main branch]
2014-09-18 17:49:40 -04:00
Gil Gribb
598cbb659c UE4 - allow draw events to work in parallel rendering, some flush tweaks
[CL 2293700 by Gil Gribb in Main branch]
2014-09-11 09:38:38 -04:00
Daniel Wright
3397798cd4 SM5 reflection environment requires scene cubemap array to be valid regardless of deferred path
[CL 2293201 by Daniel Wright in Main branch]
2014-09-10 20:40:27 -04:00
Daniel Wright
d8eda5d976 Fix for rendering reflection captures before they have been captured with the standard deferred path
[CL 2293198 by Daniel Wright in Main branch]
2014-09-10 20:30:37 -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
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
Graeme Thornton
df9dbd5ae3 Continued in-editor mobile preview work
- Removed default shader platform parameter from GetGlobalShaderMap()
 - Added an inline overload of GetGlobalShaderMap() that takes a feature level instead, and translates to the correct shader platform
 - Cached feature level on FSceneView for faster access
 - Cached shader map on FViewInfo for faster access
 - Cached featurelevel/shadermap on rendering composition graph execution context, for faster access

Fixed a couple of crashes when switching feature level dynamically
 - Needed to allow certain shader permutations to be generated if feature level was ES2, but still on a PC platform. (i.e. hitproxy shaders, and basepass shaders used by editor primitives system)

#codereview Nick.Penwarden

[CL 2275937 by Graeme Thornton in Main branch]
2014-08-28 06:22:54 -04:00
Mikolaj Sieluzycki
cfaf45ac58 Header cleanup: Engine module, public headers.
[CL 2265766 by Mikolaj Sieluzycki in Main branch]
2014-08-21 06:03:00 -04:00
Graeme Thornton
bcde0d05c2 Mobile Preview
* More removal of GRHIFeatureLevel and GRHIShaderPlatform

[CL 2262530 by Graeme Thornton in Main branch]
2014-08-19 10:41:34 -04:00
Daniel Wright
ea1d38c1c3 FPrimitiveSceneProxy::PreRenderView / DrawDynamicElements refactored into GetDynamicMeshElements
* Both paths still exist in code during this transition.  The GetDynamicMeshElements path is currently disabled, enable with 'r.UseGetDynamicMeshElements 1'.
* DrawDynamicElements was called once per pass, all sorts of pass-specific cruft had leaked in along with short-term modifications of shared structures (vertex factories and material proxies).  DrawDynamicElements was not const, so a bunch of 'update' type work had leaked in.  Various PreRenderView implementations relied on the view being in the view family.
* GetDynamicMeshElements is called once in InitViews, and the resulting meshes are used in various passes.  GetDynamicMeshElements is const and must not modify the proxy, update work should be pushed to the proxy from the game thread.  GetDynamicMeshElements can be called on views that are not in the view family, which allows a proper view for shadow depth passes.
* View mode override functionality moved out of the individual proxies into a centralized place, ApplyViewModeOverrides
* GPU particles not working yet, FRecastRenderingSceneProxy not implemented

[CL 2253795 by Daniel Wright in Main branch]
2014-08-12 18:24:52 -04:00
Graeme Thornton
747d2a9b9d Mobile Preview In Editor
- Material editor preview nodes now work when the editor is in es2 mode
 - Make editor primitives work in ES2 mode
 - Fix slate font rendering in ES2 mode
 - Remove ES2 shader de-gamma when in the editor
 - Add a new linear sampler type for linear textures
 - Various fixes for dynamic feature level switching
 - When in an emulated feature level mode, display some text in the level editor viewport saying what feature level we're running
 - Removed feature level parameter from USkeletalMesh::GetResourceForRendering. Not used for anything
 - ParticleVertexFactoryPool is now creates feature level specific vertex factories.

[CL 2187558 by Graeme Thornton in Main branch]
2014-07-10 10:39:54 -04:00
Martin Mittring
2e7acc2479 * refactor, better SceneColor naming convention
[CL 2125512 by Martin Mittring in Main branch]
2014-07-02 16:54:50 -04:00
Gil Gribb
1d50eae0de UE4 - rework RHI user-facing APIs to be safer and incorporate the desired sematics
[CL 2119499 by Gil Gribb in Main branch]
2014-06-27 11:07:13 -04:00