File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export class CopyMaterial extends ShaderMaterial {
1818 super ( {
1919 name : "CopyMaterial" ,
2020 defines : {
21+ COLOR_SPACE_CONVERSION : "1" ,
2122 DEPTH_PACKING : "0" ,
2223 COLOR_WRITE : "1"
2324 } ,
@@ -127,6 +128,38 @@ export class CopyMaterial extends ShaderMaterial {
127128
128129 }
129130
131+ /**
132+ * Indicates whether output color space conversion is enabled.
133+ *
134+ * @type {Boolean }
135+ */
136+
137+ get colorSpaceConversion ( ) {
138+
139+ return ( this . defines . COLOR_SPACE_CONVERSION !== undefined ) ;
140+
141+ }
142+
143+ set colorSpaceConversion ( value ) {
144+
145+ if ( this . colorSpaceConversion !== value ) {
146+
147+ if ( value ) {
148+
149+ this . defines . COLOR_SPACE_CONVERSION = true ;
150+
151+ } else {
152+
153+ delete this . defines . COLOR_SPACE_CONVERSION ;
154+
155+ }
156+
157+ this . needsUpdate = true ;
158+
159+ }
160+
161+ }
162+
130163 /**
131164 * Color channel weights that modulate texels from the input buffer.
132165 *
Original file line number Diff line number Diff line change @@ -455,6 +455,13 @@ export class CopyMaterial extends ShaderMaterial {
455455 * @type {DepthPackingStrategies }
456456 */
457457 set depthPacking ( arg : DepthPackingStrategies ) ;
458+ /**
459+ * Indicates whether output color space conversion is enabled.
460+ *
461+ * @type {Boolean }
462+ */
463+ get colorSpaceConversion ( ) : boolean ;
464+ set colorSpaceConversion ( value : boolean ) ;
458465 /**
459466 * Color channel weights that modulate texels from the input buffer.
460467 *
You can’t perform that action at this time.
0 commit comments