Skip to content

Commit b313f11

Browse files
committed
Remove renderer.resetColorManangement()
1 parent bb5b1f3 commit b313f11

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/renderers/WebGLRenderer.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,13 +2395,6 @@ class WebGLRenderer {
23952395

23962396
};
23972397

2398-
this.resetColorManagement = function () {
2399-
2400-
_gl.drawingBufferColorSpace = this._outputColorSpace === DisplayP3ColorSpace ? 'display-p3' : 'srgb';
2401-
_gl.unpackColorSpace = ColorManagement.workingColorSpace === LinearDisplayP3ColorSpace ? 'display-p3' : 'srgb';
2402-
2403-
};
2404-
24052398
this.resetState = function () {
24062399

24072400
_currentActiveCubeFace = 0;
@@ -2437,7 +2430,9 @@ class WebGLRenderer {
24372430

24382431
this._outputColorSpace = colorSpace;
24392432

2440-
this.resetColorManagement();
2433+
const gl = this.getContext();
2434+
gl.drawingBufferColorSpace = colorSpace === DisplayP3ColorSpace ? 'display-p3' : 'srgb';
2435+
gl.unpackColorSpace = ColorManagement.workingColorSpace === LinearDisplayP3ColorSpace ? 'display-p3' : 'srgb';
24412436

24422437
}
24432438

0 commit comments

Comments
 (0)