File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 8
8
AgXToneMapping ,
9
9
ACESFilmicToneMapping ,
10
10
NeutralToneMapping ,
11
+ CustomToneMapping ,
11
12
SRGBTransfer
12
13
} from 'three' ;
13
14
import { Pass , FullScreenQuad } from './Pass.js' ;
@@ -63,6 +64,7 @@ class OutputPass extends Pass {
63
64
else if ( this . _toneMapping === ACESFilmicToneMapping ) this . material . defines . ACES_FILMIC_TONE_MAPPING = '' ;
64
65
else if ( this . _toneMapping === AgXToneMapping ) this . material . defines . AGX_TONE_MAPPING = '' ;
65
66
else if ( this . _toneMapping === NeutralToneMapping ) this . material . defines . NEUTRAL_TONE_MAPPING = '' ;
67
+ else if ( this . _toneMapping === CustomToneMapping ) this . material . defines . CUSTOM_TONE_MAPPING = '' ;
66
68
67
69
this . material . needsUpdate = true ;
68
70
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ const OutputShader = {
28
28
}` ,
29
29
30
30
fragmentShader : /* glsl */ `
31
-
31
+
32
32
precision highp float;
33
33
34
34
uniform sampler2D tDiffuse;
@@ -68,6 +68,10 @@ const OutputShader = {
68
68
69
69
gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );
70
70
71
+ #elif defined( CUSTOM_TONE_MAPPING )
72
+
73
+ gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );
74
+
71
75
#endif
72
76
73
77
// color space
You can’t perform that action at this time.
0 commit comments