Skip to content

Commit 3825119

Browse files
committed
Address review comments on KTXmapRange.
1 parent f6f7b01 commit 3825119

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

ktxspec.adoc

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,31 +1948,34 @@ This metadata entry must not be used together with
19481948
<<KTXcubemapIncomplete,`KTXcubemapIncomplete`>>.
19491949

19501950
=== KTXmapRange
1951-
When data is input from a source with 32-bit floating point data,
1952-
such as a .exr file, and compressed to an HDR block format, such
1953-
as ASTC HDR, BC6H or UASTC HDR, the values in the source may be
1954-
mapped to the more limited range of the block-compressed format.
1951+
When the payload is a floating point format with a restricted range,
1952+
such as ASTC HDR, RGB9E5 and FLOAT16, and data is input from a
1953+
source with 32-bit floating point data, such as a .exr file,
1954+
the values in the source may be mapped to the more limited range.
19551955
KTX file writers may indicate the mapping by using the key
19561956

19571957
- `KTXmapRange`
19581958

1959-
The value is 8 bytes representing 2 IEEE 754 Float32 values:
1959+
The value is 8 bytes representing two IEEE 754 single-precision
1960+
floating-point values:
19601961
[source,c]
19611962
----
19621963
Float32 scale
19631964
Float32 offset
19641965
----
19651966

1966-
A shader can restore the original 32-bit float value with
1967+
An application can restore the original 32-bit float value with
19671968
[stem]
19681969
+++++
19691970
effective = sampled \times scale + offset
19701971
+++++
1972+
where stem:[sampled] is the value retrieved from the texture after any
1973+
filtering.
19711974

1972-
[IMPORTANT]
1975+
[TIP]
19731976
====
1974-
It's important to multiply first so that decoders can use a single
1975-
fused multiply-add instruction to apply the scale and the offset.
1977+
This formula allows decoders to use a single fused multiply-add
1978+
instruction to apply the scale and the offset.
19761979
====
19771980

19781981
This metadata entry may be used with any floating point format.

0 commit comments

Comments
 (0)