Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Conversation

@aditya-mitra
Copy link
Contributor

@aditya-mitra aditya-mitra commented Jul 6, 2023

Summary

  • added info for all inputs
  • added slider for
  • made the compression loading UI more intuitive

image

References

closes #8222

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewer

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

@aditya-mitra aditya-mitra marked this pull request as ready for review July 7, 2023 07:07
@aditya-mitra aditya-mitra requested a review from HexaField July 7, 2023 07:07
Copy link
Contributor

@HexaField HexaField left a 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

@aditya-mitra aditya-mitra requested a review from HexaField July 10, 2023 08:14
Copy link
Contributor

@speigg speigg left a 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.

@aditya-mitra
Copy link
Contributor Author

Implemented the changes!

Also, a progress indicator to show that something is happening would be valuable.

We have implemented a progress indicator which shows like this:

Screenshot_20230713_215309

@aditya-mitra aditya-mitra requested a review from speigg July 13, 2023 16:26
Copy link
Contributor

@HexaField HexaField left a 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

@HexaField HexaField self-requested a review July 14, 2023 04:27
@HexaField HexaField enabled auto-merge July 14, 2023 04:28
@HexaField HexaField disabled auto-merge July 14, 2023 04:28
@HexaField
Copy link
Contributor

whoops, forgot about Quality level and compression level should be available in UASTC mode

@aditya-mitra
Copy link
Contributor Author

aditya-mitra commented Jul 14, 2023

Actually Gheric had mentioned this:

shouldn't see qualityLevel or compressionLevel when using uastc mode, shouldn't see uastcFlags when using etc1s mode

So, I only implemented in ETC1S mode. Should I make it available for both modes?

@HexaField HexaField merged commit dd99025 into dev Jul 18, 2023
@HexaField HexaField deleted the improve/texture-compression-ui branch July 18, 2023 07:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Texture Compression workflow needs improved UI

3 participants