Commit Graph

120 Commits

Author SHA1 Message Date
charles bloom
d5b7476357 make image copying to Pow22 gamma a warning and prevent callers from doing so
pow22 should old be used as a source gamma
dest gamma should always be srgb or linear

#preflight 62432a61df7d23dbfeeb57bc
#rb none

[CL 19543713 by charles bloom in ue5-main branch]
2022-03-29 12:16:51 -04:00
charles bloom
ebd2220f02 TextureFormatOodle -OodleDebugDumpFilter command line option
#rb none
#preflight none

[CL 19523070 by charles bloom in ue5-main branch]
2022-03-27 13:30:17 -04:00
charles bloom
941a6af008 TextureFormatOodle : ensure debug dump file name doesn't get too long
#rb none
#preflight none

[CL 19521841 by charles bloom in ue5-main branch]
2022-03-26 12:02:29 -04:00
fabian giesen
598269a3db TextureFormatOodle target 16k pixels per job
Oodle Texture has cutoffs for this internally but they're much lower; we're also using 16k pixels as the cut-off for CopyImage, seems like an OK target here.

#rb dan.thompson
#preflight 6239011a1302f69e9a766891

[CL 19459702 by fabian giesen in ue5-main branch]
2022-03-21 19:04:07 -04:00
charles bloom
0213e43bbf rename DDSFile namespace to UE::DDS
#rb none
#preflight none

[CL 19414224 by charles bloom in ue5-main branch]
2022-03-16 18:26:52 -04:00
charles bloom
c9433c2752 move DDSFile from TFO to ImageCore
#rb none
#preflight 62325d07ef5d0f0e8ff1bd35

[CL 19413753 by charles bloom in ue5-main branch]
2022-03-16 18:01:49 -04:00
martins mozeiko
ba537b27b0 Fix for passing wrong slices to oodle texture compression input.
Increments Oodle Texture DDC version from 13 to 14.

#rb fabian.giesen
#preflight none

[CL 19382546 by martins mozeiko in ue5-main branch]
2022-03-15 00:39:13 -04:00
fabian giesen
9266583989 DDSFile RGBA8<->BGRA8 conversions
These are important (and trivial) enough to warrant direct support.

#rb charles.bloom
#preflight 622a5db9df3960e506a9f135

[CL 19340792 by fabian giesen in ue5-main branch]
2022-03-10 15:29:30 -05:00
fabian giesen
c372fe80be DDSFile read/write from mem not archives; cleanups.
Use TArray/TArray64 instead of raw allocs for our storage, there's no reason not to.
(The only reason the original code did raw allocs was because it was adapted from C code.)

Read from/write to memory not FArchive by request.

FDDSHeader->FDDSHeaderWithMagic, we don't care about the old-school DDSURFACEDESC,
we only ever have magic then ddsd so just make it part of the header struct.

Make mip sizes int64; a 16k * 16k R32G32B32A32_FLOAT image is enough to overflow 4GB.

#rb charles.bloom
#preflight 622914ee0d5a90e98eccf49d

[CL 19325619 by fabian giesen in ue5-main branch]
2022-03-09 16:05:29 -05:00
charles bloom
735e86e706 Texture Final compression preview option in Editor
to use Final EncodeSpeed on a texture instead of Fast when editing changes
so you can see the project's Final RDO settings while working on a texture

#preflight 6227c776671c913c052a82fb
#rb dan.thompson

[CL 19311911 by charles bloom in ue5-main branch]
2022-03-08 17:06:33 -05:00
fabian giesen
b0b8b1cbb9 DDSFile improve error handling, add support for writing D3D9-format DDS files.
Put DDS parameter validation in one function (Validate) that is shared between Create, Read, Write funcs.
Add support for saving D3D9-format DDS files, either automatically when doing so is "lossless" in "Auto" mode, or in a D3D9-only mode that tries hard to express data as a D3D9 file and will fail when it can't find a suitable mapping. Still default to writing as D3D10-format DDS since that tends to preserve semantics the best.

The pixel format tables for D3D9-format DDS files were reordered slightly to make us prefer "canonical" choices when writing D3D9 DDS files, e.g. we prefer BC2 textures to get writtten as DXT3 not DXT2, and likewise BC3 should prefer DXT5 over DXT4.

#rb Charles.Bloom
#preflight 62267996123eef55e6fa32d6

[CL 19292462 by fabian giesen in ue5-main branch]
2022-03-07 16:49:40 -05:00
danny couture
dfa3b599c8 Improve parallellism of cube textures compression for shorter overall game-thread stalls
- 14.1s to 7.6s when loading CitySample Small_City_LVL -ddc=cold

#rb Charles.Bloom, Fabian.Giesen
#preflight 6225f3a7b97fb949cf3412a2

[CL 19284116 by danny couture in ue5-main branch]
2022-03-07 07:47:05 -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
charles bloom
c02e00d084 TextureFormatOodle put format and lambda on the DebugDump file names
#rb none
#preflight none

[CL 19175977 by charles bloom in ue5-main branch]
2022-02-28 12:26:00 -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
3f69085821 fix Insights scope name OodleJob to Oodle_EncodeBCN_Task
behavior nop

#rb none
#preflight none

[CL 18997610 by charles bloom in ue5-main branch]
2022-02-15 11:47:55 -05:00
charles bloom
25077bc560 Better insights scope names in TextureFormatOodle
behavior nop

#rb none
#preflight none

[CL 18995866 by charles bloom in ue5-main branch]
2022-02-15 10:11:28 -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
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
andriy tylychko
77566d962e reverted recent Oodle compression change to use example jobify system to workaround a TaskGraph bug, as it was fixed in 18561784
[FYI] Charles.Bloom
[FYI] francis.hurteau
#jira UE-138166
#preflight trivial

#ROBOMERGE-AUTHOR: andriy.tylychko
#ROBOMERGE-SOURCE: CL 18562873 in //UE5/Release-5.0/... via CL 18562888
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18562901 by andriy tylychko in ue5-release-engine-test branch]
2022-01-10 13:48:41 -05:00
charles bloom
30499227a9 Oodle Texture TEMP force use of jobify system to avoid Task IsCompleted bug
#preflight 61d371595b6f9bf2e693dea6
#jira UE-138044, UE-138048, UE-138051, UE-138071
#rb trivial

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

[CL 18504219 by charles bloom in ue5-release-engine-test branch]
2022-01-03 17:39:53 -05:00
charles bloom
d54219d41f Small Oodle Texture logging cleanup
#rb trivial
#preflight trivial

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

[CL 18502520 by charles bloom in ue5-release-engine-test branch]
2022-01-03 14:32:56 -05:00
charles bloom
5966ccc2de remove TextureCompressor UsesTaskGraph query
not used and should not be used
clean up some todo comments in TextureFormatOodle

#preflight 61ba4ca5055f3013459c0a02
#rb none

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

[CL 18471295 by charles bloom in ue5-release-engine-test branch]
2021-12-15 16:45:31 -05:00
charles bloom
2927bbadfe TextureFormatOodle : cleanup and factor out DebugDumpDDS
#preflight 61ba39f5e46e46b53e57ac98
#rb devin.doucette

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

[CL 18470258 by charles bloom in ue5-release-engine-test branch]
2021-12-15 15:07:11 -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