Răsfoiți Sursa

Set color space to linear-sRGB (#31525)

WestLangley 5 luni în urmă
părinte
comite
b8f5c787fe
1 a modificat fișierele cu 4 adăugiri și 5 ștergeri
  1. 4 5
      examples/jsm/loaders/EXRLoader.js

+ 4 - 5
examples/jsm/loaders/EXRLoader.js

@@ -3,7 +3,6 @@ import {
 	DataUtils,
 	FloatType,
 	HalfFloatType,
-	NoColorSpace,
 	LinearFilter,
 	LinearSRGBColorSpace,
 	RedFormat,
@@ -2505,14 +2504,14 @@ class EXRLoader extends DataTextureLoader {
 					} else if ( outputFormat == RGFormat ) {
 
 						EXRDecoder.format = RGFormat;
-						EXRDecoder.colorSpace = NoColorSpace;
+						EXRDecoder.colorSpace = LinearSRGBColorSpace;
 						EXRDecoder.outputChannels = 2;
 						EXRDecoder.decodeChannels = { R: 0, G: 1 };
 
 					} else if ( outputFormat == RedFormat ) {
 
 						EXRDecoder.format = RedFormat;
-						EXRDecoder.colorSpace = NoColorSpace;
+						EXRDecoder.colorSpace = LinearSRGBColorSpace;
 						EXRDecoder.outputChannels = 1;
 						EXRDecoder.decodeChannels = { R: 0 };
 
@@ -2538,7 +2537,7 @@ class EXRLoader extends DataTextureLoader {
 					} else if ( outputFormat == RGFormat ) {
 
 						EXRDecoder.format = RGFormat;
-						EXRDecoder.colorSpace = NoColorSpace;
+						EXRDecoder.colorSpace = LinearSRGBColorSpace;
 						EXRDecoder.outputChannels = 2;
 						EXRDecoder.shouldExpand = true;
 						EXRDecoder.decodeChannels = { Y: 0 };
@@ -2546,7 +2545,7 @@ class EXRLoader extends DataTextureLoader {
 					} else if ( outputFormat == RedFormat ) {
 
 						EXRDecoder.format = RedFormat;
-						EXRDecoder.colorSpace = NoColorSpace;
+						EXRDecoder.colorSpace = LinearSRGBColorSpace;
 						EXRDecoder.outputChannels = 1;
 						EXRDecoder.decodeChannels = { Y: 0 };
 

粤ICP备19079148号