Commit Graph

59 Commits

Author SHA1 Message Date
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
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
Devin Doucette
8dae547a96 Texture: Integrated the texture compiling manager with the derived data build scheduler
This allows for pausing of async texture compilation and limiting concurrent texture builds based on the same memory limits that the asset compiling manager uses.

#jira UE-141137
#jira UE-141139
#preflight 636a78af4d3c1d9d92d2ce5a
#rb Zousar.Shaker

[CL 23033009 by Devin Doucette in ue5-main branch]
2022-11-08 13:26:12 -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
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
bryan sefcik
de1956f47b Ran IWYU on Public headers under Engine/Source/Developer/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21064294 by bryan.sefcik
#jira
#preflight 62d5c2111062f2e63015e598

#ROBOMERGE-OWNER: bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21155249 via CL 21158121 via CL 21161259
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21182053 by bryan sefcik in ue5-main branch]
2022-07-20 12:03:45 -04:00
Dan Thompson
39fc9af40d Migrate pixel format size calculations to Core so that texture build workers (and misc programs) can touch them without having to depend on RenderCore. By popular demand, brough over the RHI specific capabilities stuff as well.
#rb Mihnea.Balta
#preflight 62cdafda254b7ba6dbcf2501

[CL 21059272 by Dan Thompson in ue5-main branch]
2022-07-12 13:56:13 -04:00
charles bloom
ada7f6b1d8 Texture GetBuildRequiredEstimate better estimate of texture build memory needed
create new TextureBuildUtilities module that can be used from Engine or TextureBuildWorker
new cvar memory.WindowsPlatformMemoryGetStatsLimitTotalVirtualGB simulates a lower memory system

#rb fabian.giesen
#preflight 62b34bf8650c9d5857a38514

[CL 20786800 by charles bloom in ue5-main branch]
2022-06-22 20:21:16 -04:00
devin doucette
b2a07ea03e DDC: Merge from UE5/Main
#preflight 6288ff678828ea88c8af7034
#preflight 628ab5d93246d5019db76ed2
#rb none
#rnx

#ROBOMERGE-OWNER: devin.doucette
#ROBOMERGE-AUTHOR: Devin.Doucette
#ROBOMERGE-SOURCE: CL 20353148 via CL 20353832 via CL 20353839
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20355348 by devin doucette in ue5-main branch]
2022-05-24 16:40:25 -04:00
Devin Doucette
92a888c1f6 Replaced uses of _ASV with ANSITEXTVIEW
#preflight 6266acf50634d0904cdfe91c
#rb Steve.Robb
#rnx

[CL 19903251 by Devin Doucette in ue5-main branch]
2022-04-25 11:31:36 -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
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
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
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
charles bloom
04ffabc485 ImageWrapper and import/export refactor
FImage is now the standard preferred type for a bag of pixels
FImageView can point at pixels without owning an allocation
ERawImageFormat (FImage) converts to ETextureSourceFormat
FImageUtils provides generic load/save and get/set from FImage
major cleanup in the ImageWrappers
new preferred API is through ImageWrapperModule Compress/Decompress
SetRaw/GetRaw functions cleaned up to not have undefined behavior on unexpected formats
ImageWrapper output added for HDR,BMP,TGA
RGBA32F format added and supported throughout import/export
EditorFactories import/export made more generic, most image types handled the same way using FImage now
Deprecate old TSF RGBA order pixel formats
Fix many crashes or bad handling of unusual pixel formats
Pixel access functions should be used instead of switches on pixel type

#preflight 6230ade7e65a7e65d68a187c
#rb julien.stjean,martins.mozeiko,dan.thompson,fabian.giesen

[CL 19397199 by charles bloom in ue5-main branch]
2022-03-15 18:29:37 -04:00
Devin Doucette
05a15d862b Texture: Fixed the texture build function to stop allocating double the required memory for the source texture
#preflight 622bb99c46679d56c324116e
#rb Zousar.Shaker
#rnx

[CL 19360852 by Devin Doucette in ue5-main branch]
2022-03-11 16:28:02 -05:00
charles bloom
81695dcab8 deprecate crunch and zlib compression support on VT tiles
remove crunch use from engine

#rb fabian.giesen
#preflight 621bb341106e3d8da269ff37

[CL 19185785 by charles bloom in ue5-main branch]
2022-02-28 17:59:11 -05:00
charles bloom
ffc563cfbd Remove broken bDitherMipMapAlpha
Wasn't doing anything useful
It actually converted any non-zero alpha to full opaque
almost the opposite of what it claimed to do
Simplify the option set by removing useless options rather than fix it

#preflight 620bb7ed4353dc61c7f5c771
#rb dan.thompson,fabian.giesen

[CL 19005593 by charles bloom in ue5-main branch]
2022-02-15 17:40:14 -05:00
charles bloom
52b23c8d20 clean up the mess caused by AlphaCoverageThresholds
AlphaCoverageThresholds was accidentally enabled for all textures with thresholds = {0,0,0,1}
add new Texture bool bDoScaleMipsForAlphaCoverage
to make toggling coverage processing very clear
on old Textures that don't have the bDoScaleMipsForAlphaCoverage field, we can infer the correct value except in the case that threshold = {0,0,0,1} , in that case it's impossible to tell if it's wanted or not.  There we look up a config value "EnableLegacyAlphaCoverageThresholdScaling"
Current config has EnableLegacyAlphaCoverageThresholdScaling=1
so the legacy bad behavior is maintained

#rb fabian.giesen,julien.stjean
#preflight 6205c4050d0c8cd8aba6dd9d

[CL 18952713 by charles bloom in ue5-main branch]
2022-02-11 10:48:52 -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