Commit Graph

72 Commits

Author SHA1 Message Date
Dan Thompson
39fc9af40d Migrate pixel format size calculations to Core so that texture build workers (and misc programs) can touch them without having to depend on RenderCore. By popular demand, brough over the RHI specific capabilities stuff as well.
#rb Mihnea.Balta
#preflight 62cdafda254b7ba6dbcf2501

[CL 21059272 by Dan Thompson in ue5-main branch]
2022-07-12 13:56:13 -04:00
charles bloom
ada7f6b1d8 Texture GetBuildRequiredEstimate better estimate of texture build memory needed
create new TextureBuildUtilities module that can be used from Engine or TextureBuildWorker
new cvar memory.WindowsPlatformMemoryGetStatsLimitTotalVirtualGB simulates a lower memory system

#rb fabian.giesen
#preflight 62b34bf8650c9d5857a38514

[CL 20786800 by charles bloom in ue5-main branch]
2022-06-22 20:21:16 -04:00
devin doucette
b2a07ea03e DDC: Merge from UE5/Main
#preflight 6288ff678828ea88c8af7034
#preflight 628ab5d93246d5019db76ed2
#rb none
#rnx

#ROBOMERGE-OWNER: devin.doucette
#ROBOMERGE-AUTHOR: Devin.Doucette
#ROBOMERGE-SOURCE: CL 20353148 via CL 20353832 via CL 20353839
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20355348 by devin doucette in ue5-main branch]
2022-05-24 16:40:25 -04:00
Devin Doucette
92a888c1f6 Replaced uses of _ASV with ANSITEXTVIEW
#preflight 6266acf50634d0904cdfe91c
#rb Steve.Robb
#rnx

[CL 19903251 by Devin Doucette in ue5-main branch]
2022-04-25 11:31:36 -04:00
Devin Doucette
e5a3f1605e Texture: Renamed ForceRecompressDDCUID to CompressionCacheId
#preflight 626306c7f606b184f0a38bcb
#rb Zousar.Shaker

[CL 19901453 by Devin Doucette in ue5-main branch]
2022-04-25 09:27:12 -04:00
charles bloom
41eefbfaa8 Texture ForceRecompressDDCUID to let you manually change the DDC key to get a rebuild
#preflight 62574aed7411b8ac6277fb57
#rb dan.thompson,fabian.giesen

[CL 19747951 by charles bloom in ue5-main branch]
2022-04-13 19:31:28 -04:00
martins mozeiko
b7ce1b7247 Adds option to use separable filter for generating mips.
This allows faster texture cooking, but introduces slight changes to newly computed pixel values.
Quality of texture mips stays the same, but values are different due to different order of floating-point operations.
To keep patch sizes small, use old same code as before for generating mips for existing textures - will use new filter only for saved textures.
Currently this setting is disabled for new textures by default. See comment in Texture.cpp how to enable it.

#rb charles.bloom fabian.giesen
#preflight 624c9d9a8d1db441a9137202

[CL 19630307 by martins mozeiko in ue5-main branch]
2022-04-05 16:10:56 -04:00
charles bloom
a3c7d9cb9b fix Volume Textures with LeaveExistingMips
was not correctly mipping down Volume Depth in TextureSources
need to correct the calculation in various places where its code duped
add some size checking

#preflight 624279a8292f228e09db756d
#rb fabian.giesen

[CL 19542095 by charles bloom in ue5-main branch]
2022-03-29 10:48:15 -04:00
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
Devin Doucette
05a15d862b Texture: Fixed the texture build function to stop allocating double the required memory for the source texture
#preflight 622bb99c46679d56c324116e
#rb Zousar.Shaker
#rnx

[CL 19360852 by Devin Doucette in ue5-main branch]
2022-03-11 16:28:02 -05:00
charles bloom
81695dcab8 deprecate crunch and zlib compression support on VT tiles
remove crunch use from engine

#rb fabian.giesen
#preflight 621bb341106e3d8da269ff37

[CL 19185785 by charles bloom in ue5-main branch]
2022-02-28 17:59:11 -05:00
charles bloom
ffc563cfbd Remove broken bDitherMipMapAlpha
Wasn't doing anything useful
It actually converted any non-zero alpha to full opaque
almost the opposite of what it claimed to do
Simplify the option set by removing useless options rather than fix it

#preflight 620bb7ed4353dc61c7f5c771
#rb dan.thompson,fabian.giesen

[CL 19005593 by charles bloom in ue5-main branch]
2022-02-15 17:40:14 -05:00
charles bloom
52b23c8d20 clean up the mess caused by AlphaCoverageThresholds
AlphaCoverageThresholds was accidentally enabled for all textures with thresholds = {0,0,0,1}
add new Texture bool bDoScaleMipsForAlphaCoverage
to make toggling coverage processing very clear
on old Textures that don't have the bDoScaleMipsForAlphaCoverage field, we can infer the correct value except in the case that threshold = {0,0,0,1} , in that case it's impossible to tell if it's wanted or not.  There we look up a config value "EnableLegacyAlphaCoverageThresholdScaling"
Current config has EnableLegacyAlphaCoverageThresholdScaling=1
so the legacy bad behavior is maintained

#rb fabian.giesen,julien.stjean
#preflight 6205c4050d0c8cd8aba6dd9d

[CL 18952713 by charles bloom in ue5-main branch]
2022-02-11 10:48:52 -05:00
devin doucette
cdedb37d66 DDC: Converted the Build API to UTF-8 where appropriate
#jira UE-133382
#rb Zousar.Shaker
#rnx
#preflight 61e798ee3f00a0a23ef78c49

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18655307 in //UE5/Release-5.0/... via CL 18655320 via CL 18655322
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18655349 by devin doucette in ue5-main branch]
2022-01-19 00:27:48 -05:00
zousar shaker
4a4295dff0 Fix inconsistent serialization of floating point vectors in FTextureBuildSettings triggered by LWC. Always use float (not double) precision for these vectors.
Fix legacy DDC key generation for textures to always use double (not float) precision when composing the key.

#jira UE-139194
#rb devin.doucette
#preflight 61e5931687389804e5640da9

#ROBOMERGE-AUTHOR: zousar.shaker
#ROBOMERGE-SOURCE: CL 18633504 in //UE5/Release-5.0/... via CL 18633518 via CL 18633528
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18637381 by zousar shaker in ue5-main branch]
2022-01-18 04:31:25 -05:00
devin doucette
b4e6fce55b DDC: Changed FCacheRecord to be a collection of values
The structure with a value and attachments is an artifact of an early design where the record *was* a compact binary package. That design changed months ago and it now simplifies the cache record significantly to make it a collection of values without specific "value" and "attachment" types.

#rb Zousar.Shaker
#rnx
#preflight 61d8b94ed17842e547def37a

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18553971 in //UE5/Release-5.0/... via CL 18553976
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18553977 by devin doucette in ue5-release-engine-test branch]
2022-01-07 23:22:29 -05:00
devin doucette
35393bbb2b DDC: Split FPayload into separate FValue and FValueId types
A payload was conceptually a value with an ID. That has been formalized by removing the ID from the payload and having separate FValue and FValueId types. This separation cleans up the API in a few areas, and provides a more natural path to providing a basic key/value API.

#rb Zousar.Shaker
#rnx
#preflight 61d704c04c252480ca284d61

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18531844 in //UE5/Release-5.0/... via CL 18531856
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18531864 by devin doucette in ue5-release-engine-test branch]
2022-01-06 11:05:57 -05:00
charles bloom
64fc29ad3a versioned Oodle Texture encode
Texture uasset stores OodleTextureSdkVersion to use
legacy assets load with None
new textures automatically set version to latest
allows updating Oodle Texture Sdk without creating patches
new prefs:
[AlternateTextureCompression]
TextureCompressionFormatWithVersion
OodleTextureSdkVersionToUseIfNone

#rb dan.thompson,devin.doucette

#ROBOMERGE-AUTHOR: charles.bloom
#ROBOMERGE-SOURCE: CL 18456277 in //UE5/Release-5.0/... via CL 18456284
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v898-18417669)

[CL 18456295 by charles bloom in ue5-release-engine-test branch]
2021-12-14 13:04:03 -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
fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -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
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -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
zousar shaker
a443e34580 Change output of DDC2 texture build function to better organize structured data and bulk data into separate payloads.
Remove older prototype DDC2 texture build code path and route the commandline switch it used to be synonymous with the newer path.
Fixed a bug where DDC2 produced texture mips didn't clear the "PagedToDerivedData" flag when they were streamed in causing the code to then go get the DDC1 texture payload.
Fixed a bug where the mip info provider wasn't accounting for the fact that DDC2 mip payloads aren't prefixed with a MipSize.

#rb devin.doucette
#preflight 613a369fbf5a71000167c318

#ROBOMERGE-AUTHOR: zousar.shaker
#ROBOMERGE-SOURCE: CL 17474647 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17474683 by zousar shaker in ue5-release-engine-test branch]
2021-09-09 14:17:19 -04:00
johan torp
4afc055300 Add DDC2 memory scheduler to limit peak memory consumption
Also:
* Implemented rough memory usage estimate for texture cooking
* Fixed build action -> constant copying bug

#rb devin.doucette

#ROBOMERGE-AUTHOR: johan.torp
#ROBOMERGE-SOURCE: CL 17470303 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17470308 by johan torp in ue5-release-engine-test branch]
2021-09-09 06:04:13 -04:00