86 Commits

Author SHA1 Message Date
dan thompson
a51d37e269 Compute RequiredMemory for "DDC2" texture build worker internally to avoid it affecting ddc keys.
Update GetOutputAlphaFromKnownAlpha to have the same call structure as GetOutputAlphaFromKnownAlphaOrFail

#ushell-cherrypick of 33523860 by Dan.Thompson
#rb charles.bloom
[FYI] devin.doucette
#rnx

[CL 33638267 by dan thompson in ue5-main branch]
2024-05-14 18:20:54 -04:00
dan thompson
0a6eb11037 Preview Platform Textures
-- Added Decode interface to texture formats to return to PC viewable formats.
-- Added Detile interface to return textures to linear layout for relevant platforms.
-- Reworked the IBuild "DDC2" texture build usage to be more straightforward for chaining multiple build steps (i.e. Encode -> Tile -> Detile -> Decode).
-- Added UI to the texture editor to select a target platform to view.
-- Fixed a bug with DDC2 and CPU Copy textures (they didn't work at all)
#rb Devin.Doucette, fabian.giesen, charles.bloom
#jira UE-149124

[CL 33116818 by dan thompson in ue5-main branch]
2024-04-19 16:57:52 -04:00
dan thompson
2ed61a6050 Updating FCompressedImage2D to NumSlices from SizeZ, for clarity.
Tested cooked build diff for sanity as this should only ever affect in-memory editor values.

#jira UE-149124
#rb fabian.giesen

[CL 31997496 by dan thompson in ue5-main branch]
2024-03-04 14:39:15 -05:00
charles bloom
4b4e8649bd TextureCompressorModule::GetOutputAlphaFromKnownAlphaOrFallback to clean up common patterns of trying to query alpha
TextureFormatOodle : yes you can free the float mip immediately because hashing is no longer on an async task
FImage::FreeData with async detach option
validate VT sizes better to prevent crashes

#jira UE-183888

#rb dan.thompson, fabian.giesen

[CL 31815947 by charles bloom in ue5-main branch]
2024-02-26 16:02:58 -05:00
charles bloom
49896082b2 TextureCompressorModule use ResizeImage for MaxTextureResolution so we can resize directly from source to dest size
bump DDC key for change in output of MaxTextureResolution affected textures
Also free source images and temporaries as they are consumed and no longer needed to reduce peak mem use
In the nop case, move the image instead of copying
#rb Dan.Thompson
#jira UE-204167

[CL 31470270 by charles bloom in ue5-main branch]
2024-02-14 09:06:31 -05:00
dan thompson
47c94de653 Testing the alpha detection based on the channel source info. This CL incorporates the original 30692988 as well as the fixes under review 30729887. The base problem is a race condition touching the lock mip data - read only mip locking shoulid if at all possible favor the MipData interface rather than LockMip*. RB list is from the two input CLs.
#rb fabian.giesen
#jira UE-204348

[CL 30785833 by dan thompson in ue5-main branch]
2024-01-22 16:36:00 -05:00
evgenii babinets
40709a976b [Backout] - CL30692988
[FYI] Dan.Thompson
Original CL Desc
-----------------------------------------------------------------
Testing the alpha detection based on the channel source info.
#rb fabian.giesen
#jira UE-175146

[CL 30772929 by evgenii babinets in ue5-main branch]
2024-01-22 10:15:58 -05:00
dan thompson
48136a6f1f Testing the alpha detection based on the channel source info.
#rb fabian.giesen
#jira UE-175146

[CL 30693168 by dan thompson in ue5-main branch]
2024-01-18 14:54:53 -05:00
alexander suvorov
795fd1edf1 Implement Resize to Specific Resolution texture padding and resizing option.
#jira UE-158070
#rb Dan.Thompson

[CL 28425273 by alexander suvorov in ue5-main branch]
2023-10-03 14:56:03 -04:00
alexander suvorov
7d23806b95 Implement PadWithBorderColor texture setting.
#jira UE-158070
#rb Dan.Thompson

[CL 28253332 by alexander suvorov in ue5-main branch]
2023-09-26 18:49:57 -04:00
alexander suvorov
aae1e9742d Expose Preserve Extremes Oodle encoding option in Texture Editor UI.
#jira UE-161928
#rb Dan.Thompson

[CL 27571641 by alexander suvorov in ue5-main branch]
2023-09-01 19:25:25 -04:00
dan thompson
bb9bc58b72 CPU accessible textures
#rb fabian.giesen
#rb charles.bloom

[CL 26655002 by dan thompson in ue5-main branch]
2023-07-27 16:46:23 -04:00
eric renaudhoude
c0e4318bcb ColorManagement: Fixed DDC2 texture build for advanced source color/encoding settings, added dependency on OpenColorIO library version for key invalidation.
#jira UE-188952
#rb dan.thompson

[CL 26442009 by eric renaudhoude in ue5-main branch]
2023-07-18 14:44:35 -04:00
eric renaudhoude
05b88f3bec [Resubmitting with fix]
-----------------------------------------------------------------
ColorManagement: Utilize OpenColorIO for advanced color space transformations on textures during mip generation.

Relies on CL 26098047.

#jira UE-182792
#rb rod.bogart, dan.thompson, charles.bloom

[CL 26109698 by eric renaudhoude in ue5-main branch]
2023-06-19 19:10:44 -04:00
eric renaudhoude
461a877a66 [Backout] - CL26106088
[FYI] eric.renaudhoude
Original CL Desc
-----------------------------------------------------------------
ColorManagement: Utilize OpenColorIO for advanced color space transformations on textures during mip generation.

Relies on CL 26098047.

#jira UE-182792
#rb rod.bogart, dan.thompson, charles.bloom

[CL 26107262 by eric renaudhoude in ue5-main branch]
2023-06-19 18:04:26 -04:00
eric renaudhoude
973792234b ColorManagement: Utilize OpenColorIO for advanced color space transformations on textures during mip generation.
Relies on CL 26098047.

#jira UE-182792
#rb rod.bogart, dan.thompson, charles.bloom

[CL 26106116 by eric renaudhoude in ue5-main branch]
2023-06-19 17:26:54 -04:00
Dan Thompson
9a6a7a84d9 Plumb the mip layout down to the child texture ddc key versions as certain child formats need to know mip dimensions in order to know if aspects of the build affect the textures, as well as note in the extended data whether the texture tiling is sensitive to LODBias so that textures that change layouts as a result of that are independent in the ddc.
This also fixes the missing include path for TextureFormat.Build.cs

#rb fabian.giesen
#rb charles.bloom
#preflight 6421fa27974dfaa53cb188e5

[CL 24808879 by Dan Thompson in ue5-main branch]
2023-03-27 16:39:53 -04:00
Dan Thompson
6acfb3256c [Backout] - CL24678894
#fyi Dan.Thompson
Original CL Desc
-----------------------------------------------------------------
Plumb the mip layout down to the child texture ddc key versions as certain child formats need to know mip dimensions in order to know if aspects of the build affect the textures.
#rb fabian.giesen
#rb charles.bloom
#preflight 641378f03f3d31c94a2e86b5
#preflight 64149d297d1280ffe750d78e

[CL 24691763 by Dan Thompson in ue5-main branch]
2023-03-17 13:13:02 -04:00
Dan Thompson
98bcf4f1cb Plumb the mip layout down to the child texture ddc key versions as certain child formats need to know mip dimensions in order to know if aspects of the build affect the textures.
#rb fabian.giesen
#rb charles.bloom
#preflight 641378f03f3d31c94a2e86b5

[CL 24678894 by Dan Thompson in ue5-main branch]
2023-03-16 16:42:02 -04:00
Dan Thompson
3aa87998b2 Fix for shared linear texture encoding and DDC2/IBuild interface.
#rb fabian.giesen
#fyi devin.doucette
#preflight 640a29b5c41a0a2a772b8deb

[CL 24579796 by Dan Thompson in ue5-main branch]
2023-03-09 14:03:35 -05:00
Dan Thompson
0b9609b747 [Backout] - CL23414304
#fyi Dan.Thompson
Original CL Desc
-----------------------------------------------------------------
Cache TextureFormat on the BuildSettings so we don't have to look through the TPM whenever we want it.
#rb charles.bloom
#preflight 638f926c5624e6da5e0afa93
#preflight 638fa3c05624e6da5e12c8b9

[CL 23415924 by Dan Thompson in ue5-main branch]
2022-12-06 15:36:46 -05:00
Dan Thompson
34e354e063 Cache TextureFormat on the BuildSettings so we don't have to look through the TPM whenever we want it.
#rb charles.bloom
#preflight 638f926c5624e6da5e0afa93

[CL 23414304 by Dan Thompson in ue5-main branch]
2022-12-06 14:35:45 -05:00
Dan Thompson
15ea22eb0a Adding a separate ddc key bump version for shared linear encoding.
#rb charles.bloom
#preflight 638e504c5c5308d18c8f2627

[CL 23397882 by Dan Thompson in ue5-main branch]
2022-12-05 15:21:58 -05:00
Dan Thompson
fa34918d88 Update the texture build to route new information out:
1. Whether the source mips detects alpha
2. Several hashes to track the state of data at various stages of the build process.

Move the r.SharedLinearTextureEncoding out of the ConsoleManager as that's The Old Way.
Rename TextureDerivedDataVersion for uniqueness.
#rb devin.doucette
#rb charles.bloom
#preflight 6377fca7815e4b9b75681765

[CL 23206768 by Dan Thompson in ue5-main branch]
2022-11-18 17:09:58 -05:00
Dan Thompson
4ba968e031 Removing CompressionCacheGuid from texture build settings as it's not needed there.
#rb fabian.giesen
#preflight 636d72364a0097651f1cf37d

[CL 23088569 by Dan Thompson in ue5-main branch]
2022-11-10 17:21:42 -05:00