Skip to content

Commit 43d003c

Browse files
authored
Docs: Honor latest color management changes. (#25792)
1 parent f111638 commit 43d003c

33 files changed

+160
-117
lines changed

docs/api/en/constants/Textures.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -539,21 +539,27 @@ <h2>Internal Formats</h2>
539539
to the [link:https://www.khronos.org/registry/OpenGL/specs/es/3.0/es_spec_3.0.pdf OpenGL ES 3.0 Specification].
540540
</p>
541541

542-
<h2>Encoding</h2>
542+
<h2>Depth Packing</h2>
543543
<code>
544-
THREE.LinearEncoding
545-
THREE.sRGBEncoding
546544
THREE.BasicDepthPacking
547545
THREE.RGBADepthPacking
548546
</code>
549547
<p>
550-
For use with a Texture's [page:Texture.encoding encoding] property.<br /><br />
548+
For use with the [page:MeshDepthMaterial.depthPacking depthPacking] property of `MeshDepthMaterial`.
549+
</p>
551550

552-
If the encoding type is changed after the texture has already been used by a material,
553-
you will need to set [page:Material.needsUpdate Material.needsUpdate] to `true` to make the material recompile.<br /><br />
551+
<h2>Color Space</h2>
552+
<code>
553+
THREE.NoColorSpace
554+
THREE.SRGBColorSpace
555+
THREE.LinearSRGBColorSpace
556+
THREE.DisplayP3ColorSpace
557+
</code>
558+
<p>
559+
Used to define the color space of textures (and the output color space of the renderer).<br /><br />
554560

555-
[page:constant LinearEncoding] is the default.
556-
Values other than this are only valid for a material's map, envMap and emissiveMap.
561+
If the color space type is changed after the texture has already been used by a material,
562+
you will need to set [page:Material.needsUpdate Material.needsUpdate] to `true` to make the material recompile.<br /><br />
557563
</p>
558564

559565
<h2>Source</h2>

docs/api/en/materials/MeshDepthMaterial.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ <h3>[property:Texture alphaMap]</h3>
5454
</p>
5555

5656
<h3>[property:Constant depthPacking]</h3>
57-
<p>Encoding for depth packing. Default is [page:Textures BasicDepthPacking].</p>
57+
<p>Type for depth packing. Default is [page:Textures BasicDepthPacking].</p>
5858

5959
<h3>[property:Texture displacementMap]</h3>
6060
<p>

docs/api/en/renderers/WebGLCubeRenderTarget.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h3>[name]([param:Number size], [param:Object options])</h3>
4040
[page:Constant format] - default is [page:Textures RGBAFormat]. <br />
4141
[page:Constant type] - default is [page:Textures UnsignedByteType]. <br />
4242
[page:Number anisotropy] - default is `1`. See [page:Texture.anisotropy]<br />
43-
[page:Constant encoding] - default is [page:Textures LinearEncoding]. <br />
43+
[page:Constant colorSpace] - default is [page:Textures NoColorSpace]. <br />
4444
[page:Boolean depthBuffer] - default is `true`.<br />
4545
[page:Boolean stencilBuffer] - default is `false`.<br /><br />
4646

docs/api/en/renderers/WebGLRenderTarget.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h3>[name]([param:Number width], [param:Number height], [param:Object options])<
3939
[page:Constant format] - default is [page:Textures RGBAFormat]. <br />
4040
[page:Constant type] - default is [page:Textures UnsignedByteType]. <br />
4141
[page:Number anisotropy] - default is `1`. See [page:Texture.anisotropy]<br />
42-
[page:Constant encoding] - default is [page:Textures LinearEncoding]. <br />
42+
[page:Constant colorSpace] - default is [page:Textures NoColorSpace]. <br />
4343
[page:Boolean depthBuffer] - default is `true`. <br />
4444
[page:Boolean stencilBuffer] - default is `false`.<br />
4545
[page:Number samples] - default is 0.<br /><br />

docs/api/en/renderers/WebGLRenderer.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ <h3>[property:Object extensions]</h3>
172172
</ul>
173173
</p>
174174

175-
<h3>[property:number outputEncoding]</h3>
176-
<p>Defines the output encoding of the renderer. Default is [page:Textures THREE.LinearEncoding].</p>
177-
<p>If a render target has been set using [page:WebGLRenderer.setRenderTarget .setRenderTarget] then renderTarget.texture.encoding will be used instead.</p>
175+
<h3>[property:number outputColorSpace]</h3>
176+
<p>Defines the output color space of the renderer. Default is [page:Textures THREE.SRGBColorSpace].</p>
177+
<p>If a render target has been set using [page:WebGLRenderer.setRenderTarget .setRenderTarget] then renderTarget.texture.colorSpace will be used instead.</p>
178178
<p>See the [page:Textures texture constants] page for details of other formats.</p>
179179

180180
<h3>[property:Object info]</h3>

docs/api/en/textures/CompressedTexture.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h1>[name]</h1>
2222
<h2>Constructor</h2>
2323

2424

25-
<h3>[name]( [param:Array mipmaps], [param:Number width], [param:Number height], [param:Constant format], [param:Constant type], [param:Constant mapping], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Number anisotropy] )</h3>
25+
<h3>[name]( [param:Array mipmaps], [param:Number width], [param:Number height], [param:Constant format], [param:Constant type], [param:Constant mapping], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Number anisotropy], [param:Constant colorSpace] )</h3>
2626
<p>
2727
[page:Array mipmaps] -- The mipmaps array should contain objects with data, width and height. The mipmaps should be of the correct format and type.<br />
2828

@@ -55,7 +55,10 @@ <h3>[name]( [param:Array mipmaps], [param:Number width], [param:Number height],
5555

5656
[page:Number anisotropy] -- The number of samples taken along the axis through the pixel that has the highest density of texels.
5757
By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used.
58-
Use renderer.getMaxAnisotropy() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.<br /><br />
58+
Use renderer.getMaxAnisotropy() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.<br />
59+
60+
[page:Constant colorSpace] -- The default is [page:Textures THREE.NoColorSpace].
61+
See [page:Textures color space constants] for other choices.<br /><br />
5962
</p>
6063

6164

docs/api/en/textures/CubeTexture.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h2>Code Example</h2>
3131
<h2>Constructor</h2>
3232

3333

34-
<h3>[name]( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy )</h3>
34+
<h3>[name]( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace )</h3>
3535

3636
<p>
3737
CubeTexture is almost equivalent in functionality and usage to [page:Texture]. The only differences are that the

docs/api/en/textures/DataTexture.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h1>[name]</h1>
1616

1717
<h2>Constructor</h2>
1818

19-
<h3>[name]( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding )</h3>
19+
<h3>[name]( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, colorSpace )</h3>
2020
<p>
2121
The data argument must be an [link:https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView ArrayBufferView].
2222
Further parameters correspond to the properties inherited from [page:Texture], where both magFilter and minFilter default to THREE.NearestFilter.

docs/api/en/textures/Texture.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h2>Code Example</h2>
2929

3030
<h2>Constructor</h2>
3131

32-
<h3>[name]( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding )</h3>
32+
<h3>[name]( image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace )</h3>
3333

3434
<h2>Properties</h2>
3535

@@ -221,9 +221,9 @@ <h3>[property:number unpackAlignment]</h3>
221221
for more information.
222222
</p>
223223

224-
<h3>[property:number encoding]</h3>
224+
<h3>[property:number colorSpace]</h3>
225225
<p>
226-
[page:Textures THREE.LinearEncoding] is the default.
226+
[page:Textures THREE.NoColorSpace] is the default.
227227
See the [page:Textures texture constants] page for details of other formats.<br /><br />
228228

229229
Note that if this value is changed on a texture after the material has been used,

docs/api/fr/constants/Textures.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -534,21 +534,27 @@ <h2>Formats Internes</h2>
534534
à la [link:https://www.khronos.org/registry/OpenGL/specs/es/3.0/es_spec_3.0.pdf OpenGL ES 3.0 Specification].
535535
</p>
536536

537-
<h2>Encodage</h2>
537+
<h2>Depth Packing</h2>
538538
<code>
539-
THREE.LinearEncoding
540-
THREE.sRGBEncoding
541539
THREE.BasicDepthPacking
542540
THREE.RGBADepthPacking
543541
</code>
544542
<p>
545-
À utiliser avec une propriété de texture [page:Texture.encoding encoding].<br /><br />
543+
For use with the [page:MeshDepthMaterial.depthPacking depthPacking] property of `MeshDepthMaterial`.
544+
</p>
546545

547-
Si le type d'encodage est modifié après que la texture ait été utilisée par un matériau,
548-
vous devrez définir [page:Material.needsUpdate Material.needsUpdate] sur "true" pour que le matériau soit recompilé.<br /><br />
546+
<h2>Color Space</h2>
547+
<code>
548+
THREE.NoColorSpace
549+
THREE.SRGBColorSpace
550+
THREE.LinearSRGBColorSpace
551+
THREE.DisplayP3ColorSpace
552+
</code>
553+
<p>
554+
Used to define the color space of textures (and the output color space of the renderer).<br /><br />
549555

550-
La valeur par défaut est [page:constant LinearEncoding].
551-
Les valeurs autres que celle-ci ne sont valides que pour la carte, envMap et emissiveMap d'un matériau.
556+
If the color space type is changed after the texture has already been used by a material,
557+
you will need to set [page:Material.needsUpdate Material.needsUpdate] to `true` to make the material recompile.<br /><br />
552558
</p>
553559

554560
<h2>Source</h2>

0 commit comments

Comments
 (0)