|
|
@@ -21,13 +21,14 @@ import XRManager from './XRManager.js';
|
|
|
import NodeMaterial from '../../materials/nodes/NodeMaterial.js';
|
|
|
|
|
|
import { Scene } from '../../scenes/Scene.js';
|
|
|
+import { ColorManagement } from '../../math/ColorManagement.js';
|
|
|
import { Frustum } from '../../math/Frustum.js';
|
|
|
import { FrustumArray } from '../../math/FrustumArray.js';
|
|
|
import { Matrix4 } from '../../math/Matrix4.js';
|
|
|
import { Vector2 } from '../../math/Vector2.js';
|
|
|
import { Vector4 } from '../../math/Vector4.js';
|
|
|
import { RenderTarget } from '../../core/RenderTarget.js';
|
|
|
-import { DoubleSide, BackSide, FrontSide, SRGBColorSpace, NoToneMapping, LinearFilter, LinearSRGBColorSpace, HalfFloatType, RGBAFormat, PCFShadowMap } from '../../constants.js';
|
|
|
+import { DoubleSide, BackSide, FrontSide, SRGBColorSpace, NoToneMapping, LinearFilter, HalfFloatType, RGBAFormat, PCFShadowMap } from '../../constants.js';
|
|
|
|
|
|
import { highpModelNormalViewMatrix, highpModelViewMatrix } from '../../nodes/accessors/ModelNode.js';
|
|
|
|
|
|
@@ -1210,7 +1211,7 @@ class Renderer {
|
|
|
const { currentToneMapping, currentColorSpace } = this;
|
|
|
|
|
|
const useToneMapping = currentToneMapping !== NoToneMapping;
|
|
|
- const useColorSpace = currentColorSpace !== LinearSRGBColorSpace;
|
|
|
+ const useColorSpace = currentColorSpace !== ColorManagement.workingColorSpace;
|
|
|
|
|
|
if ( useToneMapping === false && useColorSpace === false ) return null;
|
|
|
|
|
|
@@ -1226,7 +1227,7 @@ class Renderer {
|
|
|
stencilBuffer: stencil,
|
|
|
type: this._colorBufferType,
|
|
|
format: RGBAFormat,
|
|
|
- colorSpace: LinearSRGBColorSpace,
|
|
|
+ colorSpace: ColorManagement.workingColorSpace,
|
|
|
generateMipmaps: false,
|
|
|
minFilter: LinearFilter,
|
|
|
magFilter: LinearFilter,
|
|
|
@@ -2130,8 +2131,8 @@ class Renderer {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * The current output tone mapping of the renderer. When a render target is set,
|
|
|
- * the output tone mapping is always `NoToneMapping`.
|
|
|
+ * The current tone mapping of the renderer. When not producing screen output,
|
|
|
+ * the tone mapping is always `NoToneMapping`.
|
|
|
*
|
|
|
* @type {number}
|
|
|
*/
|
|
|
@@ -2142,14 +2143,14 @@ class Renderer {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * The current output color space of the renderer. When a render target is set,
|
|
|
- * the output color space is always `LinearSRGBColorSpace`.
|
|
|
+ * The current color space of the renderer. When not producing screen output,
|
|
|
+ * the color space is always the working color space.
|
|
|
*
|
|
|
* @type {string}
|
|
|
*/
|
|
|
get currentColorSpace() {
|
|
|
|
|
|
- return this.isOutputTarget ? this.outputColorSpace : LinearSRGBColorSpace;
|
|
|
+ return this.isOutputTarget ? this.outputColorSpace : ColorManagement.workingColorSpace;
|
|
|
|
|
|
}
|
|
|
|