-
-
Notifications
You must be signed in to change notification settings - Fork 4
improve(texture compression): improvements in dialog UI #8236
Conversation
HexaField
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Quality should have a number identifying what the quality level is
- Should include compressionLevel setting as slider with number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks significantly better, but let's expose all the options available in KTX2EncodeOptions, including uastc flags and the normalMap flag. Also, not sure why the srgb option has been flipped to linear; lets expose all these options as specified in the ktx2 encoder for clarity, with the relevant information in the tooltip hints. Options relevant only to etc1s or uastc should only be visible when that mode is selected (e.g., shouldn't see qualityLevel or compressionLevel when using uastc mode, shouldn't see uastcFlags when using etc1s mode).
export interface KTX2EncodeOptions {
/**
* If true, the input is assumed to be in sRGB space. Be sure to set this correctly! (Examples: True on photos, albedo/spec maps, and false on normal maps.)
* @default false
*/
srgb?: boolean
/**
* Sets the ETC1S encoder's quality level, which controls the file size vs. quality tradeoff
* Range is [1,256]
* @default 128
*/
qualityLevel?: number
/**
* The compression_level parameter controls the encoder perf vs. file size tradeoff for ETC1S files
* It does not directly control file size vs. quality - see qualityLevel
* Range is [0,6]
* @default 2
*/
compressionLevel?: number
/**
* If true, the encoder will output a UASTC texture, otherwise a ETC1S texture.
* @default false
*/
uastc?: boolean
/**
* Use UASTC Zstandard supercompression. Use with uastc = true
* @default false
*/
uastcZstandard?: boolean
/**
* Sets the UASTC encoding performance vs. quality tradeoff, and other lesser used UASTC encoder flags.
* This is a combination of flags. See UASTCFlags
*/
uastcFlags?: number
/**
* Tunes several codec parameters so compression works better on normal maps.
* @default false
*/
normalMap?: boolean
/**
* If true, the encoder will generate mipmaps.
* @default false
*/
mipmaps?: boolean
/**
* If true the source images will be Y flipped before compression
* @default false
*/
yFlip?: boolean
}Also, a progress indicator to show that something is happening would be valuable.
…into improve/texture-compression-ui
HexaField
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Close button does not close the modal
- Quality level and compression level should be available in UASTC mode
…into improve/texture-compression-ui
|
whoops, forgot about |
|
Actually Gheric had mentioned this:
So, I only implemented in ETC1S mode. Should I make it available for both modes? |

Summary
References
closes #8222
Checklist
QA Steps
List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.