Commit Graph

173 Commits

Author SHA1 Message Date
Dan Thompson
e3b465915d Fix for longlat textures and LeaveExistingMips calculating the wrong mip count.
#preflight 63dd6de01466610c64329794

[CL 23996865 by Dan Thompson in ue5-main branch]
2023-02-03 15:44:56 -05:00
charles bloom
55ecdcc513 TextureCompressorModule : remove unnecessary and inconsistent conditional on ParallelFor in AdustImage
#rb none
#preflight 63c6d8bd2e714f64ad3d91b4

[CL 23740228 by charles bloom in ue5-main branch]
2023-01-17 12:39:52 -05:00
Joe Kirchoff
284689b856 Tasks: Suppress clang static analysis warning when deleting refcounted FTaskBase
#rnx
#rb Andriy.Tylychko
#jira  UE-169902
#preflight 6398d4a635203bc7aa86f05c

[CL 23495713 by Joe Kirchoff in ue5-main branch]
2022-12-13 14:49:42 -05:00
Joe Kirchoff
1e85eec8b3 TextureCompressor: Disable cplusplus.NewDelete static analysis checker
#jira UE-169902
#rnx
#rb trivial
#preflight 6397ac628c5081ee9afa7b8f

[CL 23484036 by Joe Kirchoff in ue5-main branch]
2022-12-12 17:47:54 -05:00
Dan Thompson
f3d53d2ba3 Fix for mip generation for child platforms unnecessarily linearizing.
TextureFormatOodle is the only format that returns true for CanAcceptNonF32Source(), which allows the build system to occasionally avoid converting to an F32 input to the compressor. However, the ChildTextureFormat for offline platform processing did not forward this function so this conversion was happening unnecessarily.

This manifested as a DDC determinism issue with the PreEncodeHash when enabling shared linear encoding, where the output mip data would be the same (as the F32 conversion would round trip without change), however the input to the convertor would change between platforms.

Since Oodle is the only format that routes this, we can invalidate only this format and avoid a worldwide rebuild.

#rb charles.bloom
#preflight 638fcd007e0feab0b77ad3f3

[CL 23419050 by Dan Thompson in ue5-main branch]
2022-12-06 18:20:21 -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
96edde023f Removing PostTile and PostEncode hashes as they cause determinism issues when enabling shared linear texture encoding.
#rb none
#preflight 63780baa8b12eb83a7e9c702

[CL 23208960 by Dan Thompson in ue5-main branch]
2022-11-18 18:23:08 -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
charles bloom
bfa7bf6198 TextureCompressorModule: mip gen filter on cube map faces should clamp, not wrap
has no effect on 2x2 or angular mip gen

#rb dan.thompson
#preflight 63600a0ee86070572fd6cd14
#jira UE-162283

[CL 22868971 by charles bloom in ue5-main branch]
2022-10-31 14:59:31 -04:00
charles bloom
5bcc4fae93 TextureCompressorModule : fix CopyTo dest GammaSpace
#rb none
#preflight none

[CL 22817012 by charles bloom in ue5-main branch]
2022-10-27 16:12:02 -04:00
charles bloom
f8d1463ab8 TextureCompressorModule: LongLat to Cubemap conversion parallelize on 6 faces
and simplify index clamp logic

#preflight 6359bbbad86d91ca2c081493
#rb fabian.giesen,dan.thompson

[CL 22804403 by charles bloom in ue5-main branch]
2022-10-27 00:05:03 -04:00
charles bloom
62bf4e93e0 fix TextureCompressorModule incorrect "Negative pixel values" Warning spew
#fyi martins.mozeiko
#preflight none
#rb none

[CL 22711245 by charles bloom in ue5-main branch]
2022-10-22 12:58:02 -04:00
Dan Thompson
18d0d17a54 Fix for cubemap arrays built from longlat sources predicting incorrect mip slice count.
#jira UE-165798
#rb fabian.giesen
#preflight 633b44902a5690003a2c25e8

[CL 22313450 by Dan Thompson in ue5-main branch]
2022-10-03 16:43:23 -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
9340393f6f TextureCompressorModule.cpp nop comment on Downscale
#rb none
#preflight none

[CL 22177550 by charles bloom in ue5-main branch]
2022-09-25 20:22:48 -04:00
charles bloom
b9e9f6f818 TextureCompressorModule.cpp fix incorrect check in MaxTextureResolution resize on nonpow2 textures
eg. triggered if source size = 2049 and you set MaxTextureResolution=2048

#rb none
#preflight none

[CL 22148359 by charles bloom in ue5-main branch]
2022-09-22 18:59:47 -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
charles bloom
094f1c9b0f fix for merge in TextureCompressorModule
[CL 21960090 by charles bloom in ue5-main branch]
2022-09-11 18:33:41 -04:00
charles bloom
3d4c2dd67c ApplyCompositeTexture allow mismatched composite texture size
fix the case where dest is a partial mip chain, previously failed
fix previously logged warning but made output with no composite
allow nonpow2 or different aspect composite texture
textures where no stretch is required make the same output as before

#rb alexander.suvorov, fabian.giesen

[CL 21960074 by charles bloom in ue5-main branch]
2022-09-11 18:31:32 -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