Commit Graph

132 Commits

Author SHA1 Message Date
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
ricard rovira
d69f51b63a Make DetectAlphaChannel public
#preflight 62f36ee2f75a2a539c716721
[REVIEW] [at]alexei.lebedev
#rnx

#ROBOMERGE-OWNER: ricard.rovira
#ROBOMERGE-AUTHOR: ricard.rovira
#ROBOMERGE-SOURCE: CL 21352299 via CL 21352302 via CL 21352378
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21352671 by ricard rovira in ue5-main branch]
2022-08-12 04:37:59 -04:00
charles bloom
3cf577ad9a comments only : clean up some todo marks
#rb none
#preflight none

[CL 21326622 by charles bloom in ue5-main branch]
2022-08-10 17:26:50 -04:00
alexander suvorov
60fa4eb1ef Remove incorrect check from mips generation code.
#rb none
#fyi charles.bloom
#preflight none

[CL 21050219 by alexander suvorov in ue5-main branch]
2022-07-11 20:22:57 -04:00
alexander suvorov
3052881f21 Fix Editor crash when performing texture downscaling with specific parameters and texture size.
Note: the crash occured in cases when the scaled dimensions snapped to zero. For example, when the source dimensions are (blocksize * p) and (blocksize * q), where p and q are coprime and downscaling factor scales the dimensions more than twice (considering the rounding).

#rb fabian.giesen
#preflight 62c89d39b3789302b1f8f8ce

[CL 21016336 by alexander suvorov in ue5-main branch]
2022-07-08 18:02:43 -04:00
charles bloom
32b2ba23ab TextureCompressorModule nop just fix comments
#rb none
#preflight none

[CL 20854698 by charles bloom in ue5-main branch]
2022-06-28 08:23:50 -04:00
charles bloom
60eb0735b4 reduce texture build memory use by freeing source images when no longer needed
#preflight 62b72389ff7f5dd87e2f5573
#rb fabian.giesen,dan.thompson

[CL 20830728 by charles bloom in ue5-main branch]
2022-06-27 10:44:18 -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
charles bloom
63b6ddd6c4 clean up handling of CompressionForceAlpha in VT Builder
make sure ForceAlpha and ForceNoAlpha are not both set

#preflight 629f6c15233ae0a8f8fa367a
#rb jeremy.moore

[CL 20539648 by charles bloom in ue5-main branch]
2022-06-07 12:04:51 -04:00
alexander suvorov
ba7c292aba #jira FORT-432261
Allow color adjustment for cubemaps created from longlat sources.
#rb charles.bloom
#preflight 627e972d6d7654cc68b225bd

[CL 20241303 by alexander suvorov in ue5-main branch]
2022-05-17 08:41:54 -04:00
charles bloom
578f1d4048 Add TSF_R32F single channel float texture source format
#preflight 6272ecc3e73769b67fe88db9
#rb dan.thompson,fabian.giesen

[CL 20064522 by charles bloom in ue5-main branch]
2022-05-05 16:58:24 -04:00
martins mozeiko
d87c36e8da Clean up AdjustColors in texture compression.
When new mip filters setting is enabled there can be minor differences in output.
Old textures will use previous code and will have no changes in output.

#rb charles.bloom
#preflight 6260686add47b4ad2181265c

[CL 19837721 by martins mozeiko in ue5-main branch]
2022-04-20 16:38:56 -04:00
charles bloom
ba398995ba TextureCompressorModule increase BuildSourceImageMipsMaxCount to a more future-proof value
#rb none
#preflight none

[CL 19653658 by charles bloom in ue5-main branch]
2022-04-06 15:24:04 -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
840055ceda TextureCompressorModule nop comment
every mip is made twice

#rb none
#preflight none

[CL 19562897 by charles bloom in ue5-main branch]
2022-03-30 15:34:39 -04:00
charles bloom
4b4c129b0c fix TextureCompressor reading from TArray that could resize
#rb none
#preflight none
#jira UE-147458

[CL 19560333 by charles bloom in ue5-main branch]
2022-03-30 13:46:53 -04:00
charles bloom
f7069e3bbb use FMath::FloorLog2 instead of writing my own
#rb none
#preflight none

[CL 19544980 by charles bloom in ue5-main branch]
2022-03-29 13:24:01 -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