File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 9
9
Mesh ,
10
10
MeshBasicNodeMaterial ,
11
11
NodeMaterial ,
12
+ SRGBColorSpace ,
12
13
UnsignedByteType ,
13
14
Vector2 ,
14
15
Vector3 ,
@@ -40,6 +41,7 @@ class LensflareMesh extends Mesh {
40
41
const occlusionMap = new FramebufferTexture ( 16 , 16 ) ;
41
42
42
43
let currentType = UnsignedByteType ;
44
+ let currentColorSpace = SRGBColorSpace ;
43
45
44
46
const geometry = LensflareMesh . Geometry ;
45
47
@@ -171,15 +173,18 @@ class LensflareMesh extends Mesh {
171
173
172
174
const renderTarget = renderer . getRenderTarget ( ) ;
173
175
const type = ( renderTarget !== null ) ? renderTarget . texture . type : UnsignedByteType ;
176
+ const colorSpace = ( renderTarget !== null ) ? renderTarget . texture . colorSpace : renderer . outputColorSpace ;
174
177
175
- if ( currentType !== type ) {
178
+ if ( currentType !== type || currentColorSpace !== colorSpace ) {
176
179
177
180
tempMap . dispose ( ) ;
178
181
occlusionMap . dispose ( ) ;
179
182
180
183
tempMap . type = occlusionMap . type = type ;
184
+ tempMap . colorSpace = occlusionMap . colorSpace = colorSpace ;
181
185
182
186
currentType = type ;
187
+ currentColorSpace = colorSpace ;
183
188
184
189
}
185
190
You can’t perform that action at this time.
0 commit comments