From 05e3aa01a5bf328c13fd1acc3038feb0955c8a84 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Thu, 7 Sep 2023 10:23:33 -0400 Subject: [PATCH] Remove renderer.resetColorManangement() --- src/renderers/WebGLRenderer.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index e0d4baada4a052..35b215c3e2198d 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -2395,13 +2395,6 @@ class WebGLRenderer { }; - this.resetColorManagement = function () { - - _gl.drawingBufferColorSpace = this._outputColorSpace === DisplayP3ColorSpace ? 'display-p3' : 'srgb'; - _gl.unpackColorSpace = ColorManagement.workingColorSpace === LinearDisplayP3ColorSpace ? 'display-p3' : 'srgb'; - - }; - this.resetState = function () { _currentActiveCubeFace = 0; @@ -2437,7 +2430,9 @@ class WebGLRenderer { this._outputColorSpace = colorSpace; - this.resetColorManagement(); + const gl = this.getContext(); + gl.drawingBufferColorSpace = colorSpace === DisplayP3ColorSpace ? 'display-p3' : 'srgb'; + gl.unpackColorSpace = ColorManagement.workingColorSpace === LinearDisplayP3ColorSpace ? 'display-p3' : 'srgb'; }