Commit Graph

72 Commits

Author SHA1 Message Date
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
Dan Thompson
8b4692d085 Remove "mutable" parts of the build settings. For platforms that need the mip dimensions, this is now piped down via a parameter instead of violating "const".
#rb fabian.giesen
#rb charles.bloom
#preflight 636987d7dc30a4ce96651026

[CL 23021179 by Dan Thompson in ue5-main branch]
2022-11-07 18:29:15 -05:00
charles bloom
77ac7664b2 Texture MipGen clamp mip filter if texture address mode is not wrap in both x&y
todo for the future to separate x/y mip gen clamp/wrap

#jira UE-162283
#preflight 63612d38ef6d25c67459c5ed
#rb alexander.suvorov

[CL 22921412 by charles bloom in ue5-main branch]
2022-11-02 13:53:39 -04:00
Dan Thompson
24456b0b23 Shared Linear Encoding for DDC1 - disabled by default, enable by cvar (r.SharedLinearTextureEncoding 1)
#rb jeff.roberts fabian.giesen devin.doucette
#preflight 6334c333b946208fc1c4856b

[CL 22233333 by Dan Thompson in ue5-main branch]
2022-09-28 18:26:45 -04:00
charles bloom
7b03388528 Normal Maps were not renormalizing normal vectors after generating mips
caused reduced length normals, which then bends them when we drop components for compression in BC5 or ASTC
don't change existing content, only normalize when new option bNormalizeNormals is enabled
note that ISPCTexComp is inconsistently doing normalization, no other tex formats do

#preflight 632270e0a514fd1e3751a141
#rb fabian.giesen

[CL 22028968 by charles bloom in ue5-main branch]
2022-09-15 10:49:25 -04:00
Dan Thompson
b66139e721 Shared Linear Texture Encoding [DDC2] -- Separates out the platform tiling code to allow for texture builds to reuse the linear texture that gets encodes with windows.
Primary Components:
    DDC2 texture build input/output revamped to support future FDerivedData references where the bulk data remains in the Zen server during cooks.
    Tiling code is separated out in to ITextureTiler interface so that tiling can be done without calling FChildTextureFormat::CompressImage[Ex]
    Adding mip dimensions to GetMipCountForBuildSettings

#rb fabian.giesen, zousar.shaker
#preflight 6304f87f516bef57ffada18d

[CL 21511157 by Dan Thompson in ue5-main branch]
2022-08-23 12:41:58 -04:00
Dan Thompson
0c889685e3 Updating the mip packing and tiling interfaces to not require image bits. This is required to determine memory layouts for textures prior to launching texture builds.
#rb fabian.geisen
#preflight 62a90ea9943e7bb256c39717

[CL 20659876 by Dan Thompson in ue5-main branch]
2022-06-14 19:00:42 -04:00
Dan Thompson
a508d784cb Provide access to mip counts prior to texture encode launch.
#rb fabian.geisen
#preflight 62a8f77f6373922cf49825ee

[CL 20658313 by Dan Thompson in ue5-main branch]
2022-06-14 17:23:56 -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
Devin Doucette
f4d87ef328 Texture: Fixed an uninitialized build setting that was causing the editor to crash with the new texture build path
#preflight 6262e1e0e87284a93cd7ba8e
#rb Zousar.Shaker
#rnx

[CL 19867722 by Devin Doucette in ue5-main branch]
2022-04-22 13:28:24 -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
charles bloom
be238dee17 fix failures on texture import of rare cases
fix RHI upload of textures that are multiple of 4 in top mip but not in lower mips
dont pad CompressedImage sizes, store true size
clean up Texture size limits and VT conditions
better default settings for texture import
clean up initialization order of TextureFormatManagerModule

#preflight 6250814a11261bc7b23d8f4b
#rb fabian.giesen,julien.stjean

[CL 19693287 by charles bloom in ue5-main branch]
2022-04-08 16:06:54 -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
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
1ba296578e fix mip map gen on non power of 2 textures
also allow MaxTextureSize on non-pow2
no longer force TMGS_NoMipMaps on non-pow2

#preflight 6241f2badc6183e3f5d32332
#rb fabian.giesen

[CL 19530862 by charles bloom in ue5-main branch]
2022-03-28 14:32:21 -04:00