Skip to content

Commit b8f5c78

Browse files
authored
Set color space to linear-sRGB (#31525)
1 parent 2155080 commit b8f5c78

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/jsm/loaders/EXRLoader.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
DataUtils,
44
FloatType,
55
HalfFloatType,
6-
NoColorSpace,
76
LinearFilter,
87
LinearSRGBColorSpace,
98
RedFormat,
@@ -2505,14 +2504,14 @@ class EXRLoader extends DataTextureLoader {
25052504
} else if ( outputFormat == RGFormat ) {
25062505

25072506
EXRDecoder.format = RGFormat;
2508-
EXRDecoder.colorSpace = NoColorSpace;
2507+
EXRDecoder.colorSpace = LinearSRGBColorSpace;
25092508
EXRDecoder.outputChannels = 2;
25102509
EXRDecoder.decodeChannels = { R: 0, G: 1 };
25112510

25122511
} else if ( outputFormat == RedFormat ) {
25132512

25142513
EXRDecoder.format = RedFormat;
2515-
EXRDecoder.colorSpace = NoColorSpace;
2514+
EXRDecoder.colorSpace = LinearSRGBColorSpace;
25162515
EXRDecoder.outputChannels = 1;
25172516
EXRDecoder.decodeChannels = { R: 0 };
25182517

@@ -2538,15 +2537,15 @@ class EXRLoader extends DataTextureLoader {
25382537
} else if ( outputFormat == RGFormat ) {
25392538

25402539
EXRDecoder.format = RGFormat;
2541-
EXRDecoder.colorSpace = NoColorSpace;
2540+
EXRDecoder.colorSpace = LinearSRGBColorSpace;
25422541
EXRDecoder.outputChannels = 2;
25432542
EXRDecoder.shouldExpand = true;
25442543
EXRDecoder.decodeChannels = { Y: 0 };
25452544

25462545
} else if ( outputFormat == RedFormat ) {
25472546

25482547
EXRDecoder.format = RedFormat;
2549-
EXRDecoder.colorSpace = NoColorSpace;
2548+
EXRDecoder.colorSpace = LinearSRGBColorSpace;
25502549
EXRDecoder.outputChannels = 1;
25512550
EXRDecoder.decodeChannels = { Y: 0 };
25522551

0 commit comments

Comments
 (0)