File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -1139,14 +1139,26 @@ class Renderer {
11391139 // to improve performance we only want to use HalfFloatType if necessary
11401140 // HalfFloatType is required when a) tone mapping is configured or b) the backend specifically requests it
11411141
1142- const type = ( currentToneMapping !== NoToneMapping || this . backend . needsHalfFloatFrameBufferTarget ( ) ) ? HalfFloatType : UnsignedByteType ;
1142+ let type , colorSpace ;
1143+
1144+ if ( currentToneMapping !== NoToneMapping || this . backend . needsHalfFloatFrameBufferTarget ( ) ) {
1145+
1146+ type = HalfFloatType ;
1147+ colorSpace = LinearSRGBColorSpace ;
1148+
1149+ } else {
1150+
1151+ type = UnsignedByteType ;
1152+ colorSpace = SRGBColorSpace ;
1153+
1154+ }
11431155
11441156 frameBufferTarget = new RenderTarget ( width , height , {
11451157 depthBuffer : depth ,
11461158 stencilBuffer : stencil ,
11471159 type : type ,
11481160 format : RGBAFormat ,
1149- colorSpace : LinearSRGBColorSpace ,
1161+ colorSpace : colorSpace ,
11501162 generateMipmaps : false ,
11511163 minFilter : LinearFilter ,
11521164 magFilter : LinearFilter ,
You can’t perform that action at this time.
0 commit comments