Commit Graph

33 Commits

Author SHA1 Message Date
charles bloom
04ffabc485 ImageWrapper and import/export refactor
FImage is now the standard preferred type for a bag of pixels
FImageView can point at pixels without owning an allocation
ERawImageFormat (FImage) converts to ETextureSourceFormat
FImageUtils provides generic load/save and get/set from FImage
major cleanup in the ImageWrappers
new preferred API is through ImageWrapperModule Compress/Decompress
SetRaw/GetRaw functions cleaned up to not have undefined behavior on unexpected formats
ImageWrapper output added for HDR,BMP,TGA
RGBA32F format added and supported throughout import/export
EditorFactories import/export made more generic, most image types handled the same way using FImage now
Deprecate old TSF RGBA order pixel formats
Fix many crashes or bad handling of unusual pixel formats
Pixel access functions should be used instead of switches on pixel type

#preflight 6230ade7e65a7e65d68a187c
#rb julien.stjean,martins.mozeiko,dan.thompson,fabian.giesen

[CL 19397199 by charles bloom in ue5-main branch]
2022-03-15 18:29:37 -04:00
eric renaudhoude
ed6d144ab2 ColorManagement: Removing custom coordinate type to replace it with the now available FVector2d.
#jira none
#rb rod.bogart
#preflight 6221134a6a33f9b416b42d3d

[CL 19250048 by eric renaudhoude in ue5-main branch]
2022-03-03 14:32:54 -05:00
martins mozeiko
73a3d6fd78 Avoid texture conversion to RGBA32F linear color space when unnecessary.
Adds faster code paths for common CopyImage conversions.

#rb charles.bloom
#preflight none

[CL 19235453 by martins mozeiko in ue5-main branch]
2022-03-02 20:13:48 -05:00
danny couture
6d12f86bba Fix editor crash in -nothreading mode
#rb none
#fyi Charles.Bloom
#preflight none

[CL 19196998 by danny couture in ue5-main branch]
2022-03-01 08:04:09 -05:00
charles bloom
84576c31d8 ImageCore NOP comment about strange and slow behavior in Linearize
#rb none
#preflight none

[CL 19119824 by charles bloom in ue5-main branch]
2022-02-24 13:51:36 -05:00
martins mozeiko
2f6746f064 Fix ParallelFor usage in CopyImage, all conversion loops now use JobIndex properly.
Remove TArrayView64 to avoid per-pixel bounds checks in conversion loops.

#rb charles.bloom
#preflight none

[CL 19053594 by martins mozeiko in ue5-main branch]
2022-02-18 14:07:46 -05:00
charles bloom
183b22c547 prepare ApplyCompositeTexture and GenerateTopMip for change
verified nop no change in behavior
prefix scopes with Texture.

#rb dan.thompson,fabian.giesen
#preflight none

[CL 19042123 by charles bloom in ue5-main branch]
2022-02-17 16:20:55 -05:00
charles bloom
67ef10a399 mark up most of the ParallelFors used in cook with named scopes for Insights
#rb arne.schober
#preflight none

[CL 18966875 by charles bloom in ue5-main branch]
2022-02-11 19:32:06 -05:00
charles bloom
b6c85ccee4 Improve Texture Cook ParallelFors
add Insights markup
factor out job count comptutation and ensure it doesn't make tiny jobs
make VT tiles non-parallel because they are already parallel at the tile level

#rb fabian.giesen,arne.schober
#preflight none

[CL 18918813 by charles bloom in ue5-main branch]
2022-02-09 11:27:22 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
eric renaudhoude
262fa16f9f Color Management: Adding (advanced) source encodings for textures.
#rb rod.bogart
#jira none
#preflight 6143e5484778fa00017df627

#ROBOMERGE-AUTHOR: eric.renaudhoude
#ROBOMERGE-SOURCE: CL 17547199 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17547204 by eric renaudhoude in ue5-release-engine-test branch]
2021-09-16 22:14:03 -04:00
charles bloom
05b4b19678 Float16Color use VectorStoreHalf/VectorLoadHalf
add SSE2 half conversions

#rb alexander.suvorov
#fyi rod.bogart

[CL 16135278 by charles bloom in ue5-main branch]
2021-04-27 20:41:39 -04:00
charles bloom
f4c3995c77 fix some more image color quantization conventions
#rb alexander.suvorov
#fyi rod.bogart

[CL 16130215 by charles bloom in ue5-main branch]
2021-04-27 14:36:38 -04:00
charles bloom
87b26ac2e6 fix gamma correction to pow22 doesn't and shouldn't exist
#rb rod.bogart

[CL 15379378 by charles bloom in ue5-main branch]
2021-02-10 16:13:51 -04:00
danny couture
6bfd85065f Make ParallelFor automatically pick the right scheduling priority to avoid low prio task interfering with the game and render threads causing huge stalls
- This dramatically improves editor framerate under high load
Cleanup all the hacks that are not needed anymore

#rb Andriy.Tylychko

[CL 14676999 by danny couture in ue5-main branch]
2020-11-06 11:20:53 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
danny couture
ff158b6e95 Async Texture Compilation
- Feature can be activated in the Experimental section of the Editor Settings
 - Replace Texture2D/TextureCube resources by placeholders until their PlatformData is ready
 - Add a utility class allowing to encapsulate raw field pointers without breaking compatibility
 - Protect PlatformData from unsafe access through encapsulation.
 - Protect texture's resource from race conditions between game and render threads through encapsulation.
    - This allows to get rid of FlushRenderingCommands and long game-thread stutters when Updating a texture's resource.
    - UpdateResource was never safe to call without a FlushRenderingCommands and multiple call-site are doing exactly that, this will fix those cases.
    - Those were probably undetected due to their low occurence rate under normal conditions but can easily be reproed during async texture compilation on 32 cores.
 - Force wait on required texture compilations for MaterialBaking, ProxyMesh, Thumbnail generation for disk usage
 - Wait on all textures compilation whenever a wait for all shaders compilation is requested for safety (i.e. screenshot)
 - Compile UI and heightmap textures with higher priority to reduce visual artefacts
 - Increase priority of texture that have been rendered to improve time-to-usefulness of the editor under low core count
 - Async compilation is disabled for -game / non-editor mode as there is currently no support for async bulk data loading from external files
 - Properly cancel async tasks when UTexture is garbage collected before the compilation is finished
 - Show progress when explicitly waiting on compilation
 - Changing the mip settings in the texture editor (or any settings requiring the running platform data to be recomputed) will now be processed asynchronously.

DEBUGGING

 - Can be forcibly enabled/disabled through command-line via -asynctexturecompilation=[off, on, paused]
 - Can pause texture compilation using Editor.AsyncTextureCompilation = 2 or -asynctexturecompilation=paused
 - Can manually resume a specified amount of paused compilation using Editor.AsyncTextureCompilationResume [Num]
 - Can forcibly wait on all compilation using Editor.AsyncTextureCompilationFlushAll

BENCHMARKS

 - 3m15s to 1m20s when loading Apollo_Terrain with no textures in DDC (AMD TR 3970X)
 - 6m45s to 1m11s when loading Apollo_Terrain with no textures in DDC (-corelimit=8)
 - 3m10s to 1m54s when lauching PIE on Apollo_Terrain with no textures in DDC (AMD TR 3970X)
 - 7m43s to 1m36s when lauching PIE on Apollo_Terrain with no textures in DDC (-corelimit=8)
 - 0m57s to 0m42s when importing Attic_NVIDIA.usd with no textures in DDC (AMD TR 3970X)
 - 2m14s to 0m35s when importing Attic_NVIDIA.usd with no textures in DDC (-corelimit=4)

TESTS
 - Success on all material baking tests from EngineTests with -asynctexturecompilation=paused
 - Runned with -corelimit=1 all the way to unlimited
 - Cooking worked
 - Opening the texture editor/material editor will force the compilation to finish like expected.
 - Changing a setting in the texture editor will recompile async, even allowing to close the editor and continue doing other changes.
 - Unpausing the compilation will update the texture thumbnails properly.
 - Started with -asynctexturecompilation=paused, and then unpaused after a map loading, and then into a PIE session to stresstest UpdateResources.
 - Tested both dx11/dx12
 - Vulkan fails on Fortnite even with -asynctexturecompilation=off because of Landscape weigthmap, not this CL.
 - Compiled and tested FortniteGame / UE4 / ShooterGame projects

#rb Uriel.Doyon, Francis.Hurteau

[CL 13694814 by danny couture in ue5-main branch]
2020-06-16 22:16:25 -04:00
rolando caloca
997499e35a F - Copy from 11287679
Support for Half (R16F) textures
[FYI] Dmitriy.Dyomin, Brian.White, Will.Damon, Luke.Thatcher
#jira UE-91681

#ROBOMERGE-SOURCE: CL 12766470 via CL 12766473 via CL 12766477
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v678-12743200)

[CL 12766484 by rolando caloca in Main branch]
2020-04-13 17:28:42 -04:00
ryan durand
0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00
jeremy moore
19c79b7a06 Added texture source image support for G16
Needed for heightmaps


#ROBOMERGE-SOURCE: CL 8966460 via CL 8966466 via CL 8966471
#ROBOMERGE-BOT: (v436-8951088)

[CL 8966475 by jeremy moore in Main branch]
2019-09-22 16:19:26 -04:00
Ben Hoffman
7d29081ebe Improve packing of Size Box widgets and BP panels
#jira none
#rb me
#rnx

[CL 8376562 by Ben Hoffman in Dev-Framework branch]
2019-08-29 17:23:47 -04:00
arne schober
0c60902987 REL - Change texture storage to Array64 to support 16K and larger Texture import
#RB None
#jira UE-57085

#ROBOMERGE-SOURCE: CL 7779274 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v386-7774470)

[CL 7779280 by arne schober in Main branch]
2019-08-05 18:18:06 -04:00
Rolando Caloca
aa0d2303d6 Copying //UE4/Dev-Rendering to Dev-Main (//UE4/Dev-Main) @ 6944469
#rb none
#rnx

[CL 6944849 by Rolando Caloca in Main branch]
2019-06-11 18:27:07 -04:00
Marcus Wassmer
cbfcbbb93b Merging //UE4/Dev-Main@4662404 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
Should be just copyright updates

[CL 4680440 by Marcus Wassmer in Dev-Rendering branch]
2019-01-03 19:16:26 -05:00