WEBGL_compressed_texture_astc: getSupportedProfiles() 方法
WEBGL_compressed_texture_astc.getSupportedProfiles() 方法返回一個字串陣列,其中包含實現所支援的 ASTC 配置檔名稱。
語法
js
getSupportedProfiles()
引數
無。
返回值
一個包含字串元素的 Array,指示實現支援哪些 ASTC 配置檔案。目前,這可以是:
- "ldr": 低動態範圍。
- "hdr": 高動態範圍。
動態範圍是指場景中最亮和最暗部分的比率。低動態範圍例如 JPEG 格式影像,其比率不會超過 255:1,或者 CRT 顯示器,其比率不會超過 100:1。HDR 影像儲存的畫素值涵蓋了真實世界場景的整個色調範圍 (100,000:1)。
示例
js
const ext = gl.getExtension("WEBGL_compressed_texture_astc");
ext.getSupportedProfiles(); // ["ldr"]
規範
| 規範 |
|---|
| WebGL WEBGL_compressed_texture_astc 擴充套件規範 |
瀏覽器相容性
載入中…