@@ -21,13 +21,14 @@ import XRManager from './XRManager.js';
21
21
import NodeMaterial from '../../materials/nodes/NodeMaterial.js' ;
22
22
23
23
import { Scene } from '../../scenes/Scene.js' ;
24
+ import { ColorManagement } from '../../math/ColorManagement.js' ;
24
25
import { Frustum } from '../../math/Frustum.js' ;
25
26
import { FrustumArray } from '../../math/FrustumArray.js' ;
26
27
import { Matrix4 } from '../../math/Matrix4.js' ;
27
28
import { Vector2 } from '../../math/Vector2.js' ;
28
29
import { Vector4 } from '../../math/Vector4.js' ;
29
30
import { RenderTarget } from '../../core/RenderTarget.js' ;
30
- import { DoubleSide , BackSide , FrontSide , SRGBColorSpace , NoToneMapping , LinearFilter , LinearSRGBColorSpace , HalfFloatType , RGBAFormat , PCFShadowMap } from '../../constants.js' ;
31
+ import { DoubleSide , BackSide , FrontSide , SRGBColorSpace , NoToneMapping , LinearFilter , HalfFloatType , RGBAFormat , PCFShadowMap } from '../../constants.js' ;
31
32
32
33
import { highpModelNormalViewMatrix , highpModelViewMatrix } from '../../nodes/accessors/ModelNode.js' ;
33
34
@@ -1210,7 +1211,7 @@ class Renderer {
1210
1211
const { currentToneMapping, currentColorSpace } = this ;
1211
1212
1212
1213
const useToneMapping = currentToneMapping !== NoToneMapping ;
1213
- const useColorSpace = currentColorSpace !== LinearSRGBColorSpace ;
1214
+ const useColorSpace = currentColorSpace !== ColorManagement . workingColorSpace ;
1214
1215
1215
1216
if ( useToneMapping === false && useColorSpace === false ) return null ;
1216
1217
@@ -1226,7 +1227,7 @@ class Renderer {
1226
1227
stencilBuffer : stencil ,
1227
1228
type : this . _colorBufferType ,
1228
1229
format : RGBAFormat ,
1229
- colorSpace : LinearSRGBColorSpace ,
1230
+ colorSpace : ColorManagement . workingColorSpace ,
1230
1231
generateMipmaps : false ,
1231
1232
minFilter : LinearFilter ,
1232
1233
magFilter : LinearFilter ,
@@ -2130,8 +2131,8 @@ class Renderer {
2130
2131
}
2131
2132
2132
2133
/**
2133
- * The current output tone mapping of the renderer. When a render target is set ,
2134
- * the output tone mapping is always `NoToneMapping`.
2134
+ * The current tone mapping of the renderer. When not producing screen output ,
2135
+ * the tone mapping is always `NoToneMapping`.
2135
2136
*
2136
2137
* @type {number }
2137
2138
*/
@@ -2142,14 +2143,14 @@ class Renderer {
2142
2143
}
2143
2144
2144
2145
/**
2145
- * The current output color space of the renderer. When a render target is set ,
2146
- * the output color space is always `LinearSRGBColorSpace` .
2146
+ * The current color space of the renderer. When not producing screen output ,
2147
+ * the color space is always the working color space .
2147
2148
*
2148
2149
* @type {string }
2149
2150
*/
2150
2151
get currentColorSpace ( ) {
2151
2152
2152
- return this . isOutputTarget ? this . outputColorSpace : LinearSRGBColorSpace ;
2153
+ return this . isOutputTarget ? this . outputColorSpace : ColorManagement . workingColorSpace ;
2153
2154
2154
2155
}
2155
2156
0 commit comments