@@ -2135,6 +2135,24 @@ WebGPU allows all of the color spaces in the {{PredefinedColorSpace}} enum.
2135
2135
Note, each color space is defined over an extended range, as defined by the referenced CSS definitions,
2136
2136
to represent color values outside of its space (in both chrominance and luminance).
2137
2137
2138
+ <div class=note heading>
2139
+ As described above, {{GPUTexture}}s are not color managed. This includes `-srgb` formats,
2140
+ which despite their are not *tagged* with an sRGB color space (like those described by
2141
+ {{PredefinedColorSpace}} and the CSS color spaces <a value for=color()>srgb</a> and
2142
+ <a value for=color()>srgb-linear</a>).
2143
+
2144
+ However, `-srgb` texture formats *do* have gamma-encoding/decoding properties which are
2145
+ algorithmically close to those used for gamma encoding in {{PredefinedColorSpace/"srgb"}} and
2146
+ {{PredefinedColorSpace/"display-p3"}}. For example, a fragment
2147
+ shader can output an "sRGB-linear"-encoded (physically linear) color value into an `-srgb`
2148
+ format texture, which will gamma-encode the value when it is written.
2149
+ Then, the value in the texture will be correctly encoded for use on a
2150
+ {{PredefinedColorSpace/"srgb"}}-tagged (approximately perceptually-linear) canvas.
2151
+
2152
+ It is similarly possible to take advantage of these properties using
2153
+ {{GPUQueue/copyExternalImageToTexture()}}; see its description for additional information.
2154
+ </div>
2155
+
2138
2156
An <dfn dfn>out-of-gamut premultiplied RGBA value</dfn> is one where any of the R/G/B channel values
2139
2157
exceeds the alpha channel value. For example, the premultiplied sRGB RGBA value [1.0, 0, 0, 0.5]
2140
2158
represents the (unpremultiplied) color [2, 0, 0] with 50% alpha, written `rgb(srgb 2 0 0 / 50%)` in CSS.
0 commit comments