mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
3c2010d281269994deefcc86297a79247a9aeb34
21 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
367923aa7b |
GlobalDistanceField - optimizations and refactors
* Decreased Global Distance Field border from full voxel to half voxel and decreased page size from 16 to 8. This removes ~30% of pages, saving memory and improving update speed * Half texel border requires to compute gradients using 8 page table fetches, but it didn�t influence Lumen tracing performance on console * Smaller pages put some pressure on culling and other passes. Culling grid was switch from per page to per 4x4x4 pages. Overall full GDF update speed in FortGPUTestBed decreased from 5.89ms to 4.57ms * Switched page table format to UInt32 in order to support larger Global Distance Field resolutions * Moved all GlobalDistanceField shaders into /DistanceField/* folder, in future we should move other distance field shaders there * Moved GlobalDistanceField page stats from r.Lumen.Visualize.Stats in Lumen code to r.GlobalDistanceField.Debug in GlobalDistanceField code * Fixed Lumen normal visualization when only Global Distance Field tracing is enabled #preflight 62630427006fa20b683b405a [FYI] Tiago.Costa, Daniel.Wright #ROBOMERGE-AUTHOR: krzysztof.narkowicz #ROBOMERGE-SOURCE: CL 19873116 via CL 19873429 via CL 19874251 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014) [CL 19878047 by krzysztof narkowicz in ue5-main branch] |
||
|
|
3ec100bc2d |
DistanceFieldObjectCulling in Translated World Space.
#rb none #preflight none #jira none [CL 19264320 by tiago costa in ue5-main branch] |
||
|
|
ad0bd67d38 |
Store FDFObjectData::WorldToVolume/VolumeToWorld as FLWCInverseMatrix/FLWCMatrix.
- Added LWCHackToFloat to higher level code. - Converted a few simple usages to work correctly in LWC. #rb none #preflight none #jira none [CL 19256116 by tiago costa in ue5-main branch] |
||
|
|
7a498bc734 |
Store FDFObjectBounds::Center as FLWCVector3
- Added LWCHackToFloat to higher level code. - Converted a few simple usages to work correctly in LWC. #rb none #preflight none #jira none [CL 19255315 by tiago costa in ue5-main branch] |
||
|
|
b5e9424cf2 |
Fix incorrect indexing when building mesh SDF culled tile data.
- Caused flickering and incorrect results in DFAO. - Index NumCulledTilesArray and CulledTilesStartOffsetArray using packed culled instance index. #jira UE-143869 #rb Krzysztof.Narkowicz #preflight 621904c9f969c42ee5db969b #lockdown juan.canada #ROBOMERGE-AUTHOR: tiago.costa #ROBOMERGE-SOURCE: CL 19171635 in //UE5/Release-5.0/... via CL 19171747 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845) [CL 19171825 by tiago costa in ue5-main branch] |
||
|
|
0da8f71523 |
Refactored Distance Field culling
* Removed culled DF object copies during culling. Instead now only indices to culled objects are stored * Refactored DF heightfield object loads into FHeightfieldObjectBounds and FHeightfieldObjectData This is a step towards optimizing DF culling and reusing this code for Lumen Landscape culling Perf Reverb on 2080: * CullMeshSDFObjectsToFrustum 0.04ms->0.03ms (removed DF object copies) * Other passes didn't change #preflight 61f5a7b7694910780bd91918 #rb Tiago.Costa #ROBOMERGE-AUTHOR: krzysztof.narkowicz #ROBOMERGE-SOURCE: CL 18789232 in //UE5/Release-5.0/... via CL 18789258 via CL 18789368 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545) [CL 18789821 by krzysztof narkowicz in ue5-main branch] |
||
|
|
14ea9b00e5 |
Merging Dev-LWCRendering into Main, this includes initial work to support rendering with LWC-scale position
Basic approach is to add HLSL types FLWCScalar, FLWCMatrix, FLWCVector, etc. Inside shaders, absolute world space position values should be represented as FLWCVector3. Matrices that transform *into* absolute world space become FLWCMatrix. Matrices that transform *from* world space become FLWCInverseMatrix. Generally LWC values work by extending the regular 'float' value with an additional tile coordinate. Final tile size will be a trade-off between scale/accuracy; I'm using 256k for now, but may need to be adjusted. Value represented by a FLWCVector thus becomes V.Tile * TileSize + V.Offset. Most operations can be performed directly on LWC values. There are HLSL functions like LWCAdd, LWCSub, LWCMultiply, LWCDivide (operator overloading would be really nice here). The goal is to stay with LWC values for as long as needed, then convert to regular float values when possible. One thing that comes up a lot is working in translated (rather than absolute) world space. WorldSpace + View.PrevPreViewTranslation = TranslatedWorldspace. Except 'View.PrevPreViewTranslation' is now a FLWCVector3, and WorldSpace quantities should be as well. So that becomes LWCAdd(WorldSpace, View.PrevPreViewTranslation) = TranslatedWorldspace. Assuming that we're talking about a position that's "reasonably close" to the camera, it should be safe to convert the translated WS value to float. The 'tile' coordinate of the 2 LWC values should cancel out when added together in this case. I've done some work throughout the shader code to do this. Materials are fully supporting LWC-values as well. Projective texturing and vertex animation materials that I've tested work correctly even when positioned "far away" from the origin. Lots of work remains to fully convert all of our shader code. There's a function LWCHackToFloat(), which is a simple wrapper for LWCToFloat(). The idea of HackToFloat is to mark places that need further attention, where I'm simply converting absolute WS positions to float, to get shaders to compile. Shaders converted in this way should continue to work for all existing content (without LWC-scale values), but they will break if positions get too large. General overview of changed files: LargeWorldCoordinates.ush - This defines the FLWC types and operations GPUScene.cpp, SceneData.ush - Primitives add an extra 'float3' tile coordinate. Instance data is unchanged, so instances need to stay within single-precision range of the primitive origin. Could potentially split instances behind the scenes (I think) if we don't want this limitation HLSLMaterialDerivativeAutogen.cpp, HLSLMaterialTranslator.cpp, Preshader.cpp - Translated materials to use LWC values SceneView.cpp, SceneRelativeViewMatrices.cpp, ShaderCompiler.cpp, InstancedStereo.ush - View uniform buffer includes LWC values where appropriate #jira UE-117101 #rb arne.schober, Michael.Galetzka [CL 17787435 by Ben Ingram in ue5-main branch] |
||
|
|
f90e925207 |
Fix shader compiler error.
[CL 16694847 by tiago costa in ue5-main branch] |
||
|
|
a9f8a5d2d9 |
Use StructuredBuffers in FTileIntersectionParameters.
Also use rounded MaxSceneObjects in AllocateTileIntersectionBuffers. #rb krzysztof.narkowicz [CL 16690117 by tiago costa in ue5-main branch] |
||
|
|
697b5b9cf6 |
Sparse, narrow band, streamed Mesh Signed Distance Fields
* SDFs are now generated, allocated from the atlas and uploaded in 8^3 bricks (7^3 unique data, half voxel padding). * Tracing must load the brick index from the indirection table, and only bricks near the surface are stored * 3 mips are now generated, with the lowest resolution always loaded and the other 2 streamed * SDFs are now G8 narrow band. Lower resolution mips must be traversed when querying distance to nearest surface far away from the surface * The Distance Field Brick Atlas is now stored for each FScene and dynamically resized based on needs with a GPU memcopy * Brick atlas uses a 1d pooled allocator which has no fragmentation and greatly reduces packing waste over the 3d allocator * Added new indirection for Distance Field Asset data, so that only a single entry needs to be updated when a mip is streamed in or out in scenes with millions of instances * Compute shaders operating on distance field instances generate streaming requests, which are async read back to CPU, turned into IO requests, which are polled and when complete uploaded to atlases * Any mesh instance inside the Global SDF extent (200m) requests mip1, and at 50m requests mip2 * Now using a batched compute scatter to upload to the distance field atlas instead of RHIUpdateTexture3d, to bypass alignment restrictions and per-upload overhead * Distance Field streaming uses an async task to move Memcpy and IO request overhead off of the Rendering Thread * Distance Field Visualization now computes a normal from the SDF gradient and does simple lighting to better visualize the scene representation * Increased r.DistanceFields.MaxPerMeshResolution from 128 to 512, to better represent large objects * Mesh SDF generation now uses an Embree point query to calculate closest unsigned distance, and then a much smaller set of rays to count backfaces for negative region determination, for a 11x speedup * Upgraded mesh utilities to Embree 3.12.2 to get point queries * Fixed wrong transform used for SDF normals in Lumen, causing non-uniformly scaled meshes to have incorrect Surface Cache interpolation * Fixed Static Mesh materials not getting PostLoaded before SDF build, causing their blend modes to be wrong for the build, which corrupts the DDC. Also included those blend modes in the DDC key. Original costs on 1080 GTX (full updates on everything and no screen traces) 10.60ms UpdateGlobalDistanceField 3.62ms LumenReflectiveTest.DirectionalLight_1 Shadowmap 1 1.73ms VoxelizeCards Clipmaps=[0,1,2,3] 0.38ms TraceCards 1 dispatch 1 groups 0.51ms TraceCards 1 dispatch 1 groups Sparse SDF costs 12.06ms UpdateGlobalDistanceField 4.35ms LumenReflectiveTest.DirectionalLight_1 Shadowmap 1 2.30ms VoxelizeCards Clipmaps=[0,1,2,3] 0.69ms TraceCards 1 dispatch 1 groups 0.77ms TraceCards 1 dispatch 1 groups Tested: TopazEntry PC, Reverb PC and PS5, EngineTests, QAGame, Rift, Frosty P_Construct_WP, FortGPUTestbed #rb Krzysztof.Narkowicz #ROBOMERGE-OWNER: Daniel.Wright #ROBOMERGE-AUTHOR: daniel.wright #ROBOMERGE-SOURCE: CL 15784493 in //UE5/Release-5.0-EarlyAccess/... #ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269) #ROBOMERGE-CONFLICT from-shelf [CL 15790658 by Daniel Wright in ue5-main branch] |
||
|
|
c61e716d8e |
Mesh distance fields - refactored LoadGlobalObject* functions into LoadDFObjectData.
#rb none [CL 14636549 by Krzysztof Narkowicz in ue5-main branch] |
||
|
|
95d19f95b1 |
[REVERB] Merging //UE4/Private-Reverb-Development@13832732
#rb graham.wihlidal, rune.stubbe, brian.karis, andrew.lauritzen, jeff.farris [CL 13834854 by Michal Valient in ue5-main branch] |
||
|
|
e167288eb5 |
Addressing a number of DXC shader validation errors and warnings
#rb David.Harvey #jira none #rnx #ushell-cherrypick of 12330720 by eric.mcdaniel #ROBOMERGE-SOURCE: CL 12726817 in //UE4/Release-4.25Plus/... via CL 12781740 #ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v681-12776863) [CL 12782554 by eric mcdaniel in Main branch] |
||
|
|
983aa0af59 |
Extend distance field shadowing to also handle heightfields. This is another approach to shadow terrains. Compared to far shadow cascades, it showed lower RT and GPU overhead during internal testing.
#rb Krzysztof.Narkowicz [FYI] Ben.Woodhouse #ROBOMERGE-SOURCE: CL 10996123 via CL 10996131 via CL 10996136 #ROBOMERGE-BOT: (v633-10983880) [CL 10996139 by jian ru in Main branch] |
||
|
|
360d078ca3 |
Second batch of remaining Engine copyright updates.
#rnx #rb none [CL 10871248 by Marc Audy in Main branch] |
||
|
|
7598af0532 |
Update copyright notices to 2019.
#rb none #lockdown Nick.Penwarden [CL 4662404 by Ben Marsh in Main branch] |
||
|
|
2b944cb943 |
Copying //UE4/Dev-Rendering@4626416 to Dev-Main (//UE4/Dev-Main)
#rb none #lockdown nick.penwarden [CL 4626501 by Marcus Wassmer in Main branch] |
||
|
|
d90da4ab1a |
Merge to Dev-Main for 4.20 @ 4090813
#rb #rnx #lockdown Nick.Penwarden [CL 4091081 by Marc Audy in Main branch] |
||
|
|
7a0f229e8d |
Copying //UE4/Fortnite-Staging to //UE4/Dev-Main (Source: //Fortnite/Main/Engine @ 3876564)
#lockdown Nick.Penwarden #rnx #rb none [CL 3903710 by Marc Audy in Main branch] |
||
|
|
13d012685f |
Merging copyright update from 4.19 branch.
#rb none #rnx #jira [CL 3818977 by Ben Marsh in Staging-4.19 branch] |
||
|
|
64e19e2224 |
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3511476)
#lockdown Nick.Penwarden ===================================== MAJOR FEATURES + CHANGES ===================================== Change 3372740 by Chris.Bunner [Experimental] Partial compute post process pipeline (r.PostProcess.PreferCompute). StencilSceneTexture added to deferred list. A few known issues to be fixed in a follow-up CL. Change 3374187 by Chris.Bunner Volume texture support for CombineLUTs/Tonemap compute pass. Refactored common param code to shared sub-class in CombineLUTs and Tonemap PS/CS. Skip compute post process out-of-bounds writes. Unsigned type conversion fixes. Trimmed compute post process shader inputs. Change 3441680 by Uriel.Doyon Added units to point light intensity, to allow the user to specify the value in candelas or lumens. New point light actors now configure the intensity in candelas by default. Replaced viewport exposure settings by an EV100 slider. Hidding the tone mapper in the show flag now still applies the exposure. Added a new AutoExposure method called EV100 which allows to specify : - MinEV100, MaxEV100 - Calibration Constnat - Exposure Compensation #jira UE-42783 Change 3454636 by Uriel.Doyon Fixed point light having an extra scale of 16 in mobile #jira UE-45272 Change 3454844 by Uriel.Doyon Fixed extra X16 on some point lights #jira UE-45250 Change 3454934 by Chris.Bunner Backing out changelists 3441680, 3454636 and 3454844 for the sake of integration stability. Change 3461206 by Guillaume.Abadie Adds possibility to scene captures and player controller to render no primitives at all. Change 3461207 by Guillaume.Abadie Exposes showflag details to USceneCaptureComponent. This gives the possibility to configure scene capture's showflags in blueprint encapsulated compositing pipeline. #jira UE-6810 Change 3461233 by Chris.Bunner Added Log10 material expression. Added tooltip for Log2 and Log10. Change 3461434 by Michael.Trepka Copy of CL 3456118 In Metal RHI report texture streaming as immediately successful as on D3D to avoid a race-condition leading to deadlock between the Main, Game, Render & RHI threads. #jira UE-44961 Change 3461770 by Benjamin.Hyder Submitting TM-RayTracedDistanceField map Change 3461929 by Marc.Olano Add Sobol blueprint and material node test maps to RenderTest project Change 3462249 by Uriel.Doyon Translucency after DoF is now disabled when showflag postprocess is disabled. Change 3462371 by Brian.Karis VT addressing is now 64bit to support huge sparse virtualized volumes 16bit page tables working. Change 3462936 by Marc.Olano Extend Sobol testing map with comparision between Random Sobol and Next Sobol functions Change 3464394 by Uriel.Doyon Improved synchronization for texture streaming commands. This fixes an issue when accessing FStreamingTexture for pending textures. Change 3464743 by Guillaume.Abadie Adds .usf file extension on all shader's source file names and adds checks to verify them at engine load time. Change 3464818 by Guillaume.Abadie Fixes compilation error in FindShaderRelativePath Change 3465184 by Daniel.Wright r.Shadow.PreShadowResolutionFactor 1.0 on Epic shadow settings Change 3465283 by Marc.Olano Update Sobol Gray code tables to match random order tables Change 3465976 by Arne.Schober DR - [UE-44393] - The Canvas is using the Globalshaders for clearing but compilation is done asynconously at load time. Unfortunately there could be Code that uses a canvas to draw and cause this issue in between. There might be some plugins that do this. For now we need to wait and block for the shaqders to be compiled until we can allo the use of the canvas. #RB none Change 3467513 by Guillaume.Abadie Fixes an issue where primitives would no longer draw in gameplay. #jira UE-45550 Change 3471116 by Richard.Wallis Mac OpenGL Is No Longer Supported - Remove All Code & Shader Platforms. Merge of CL 3327784 dev-editor stream from Michael Trepka with some extra changes. - Also removed Metal shader platforms from PlatformSupportsDebugViewShaders() otherwise we get a compiler error. HLSL register binds not implemented in metal backend. #jira UE-39108 Change 3471117 by Richard.Wallis Drop down menus clip on 27" Screen iMacs. Disable viewport HDR rendering on macOS 10.12.x when in editor. #jira UE-43026 Change 3471130 by Richard.Wallis Mac GPU hang causes editor output log to be written to the wrong file. Try to emulate windows behaviour when opening a file for reading or writing. Tested against behaviour of windows log file with multiple instances running. - Only defined in for Mac and non shipping. #jira UE-44934 Change 3471224 by Guillaume.Abadie Lets the ProjectFileGenerator to look at Shaders/ directories in plugin and game projects. Change 3471646 by Daniel.Wright Fixed ensure opening UT system settings Change 3471862 by Arne.Schober DR - revert accidently checked in changes. #RB Chris.Bunner Change 3472249 by Guillaume.Abadie Implements virtual shader source directory mapping. - /Engine/... maps to Engine/Shaders/... - /Plugin/FooBar/... maps to FooBar plugin's Shaders/ directory - /Project/... maps to project's Shaders/ directory Change 3472443 by Daniel.Wright Moved the Rendering category for lights to be just below the Light category, so the bVisible property is easily accessible Change 3474537 by Uriel.Doyon Fixed lighting needs rebuild happening after blueprint rescript and a non symetrical Quaterion != ToQuaternion(ToRotator(Quaternion) Change |