We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7507a62 commit d6c2bd9Copy full SHA for d6c2bd9
src/effects/N8AO/EffectCompositer.js
@@ -1,5 +1,11 @@
1
import * as THREE from 'three'
2
3
+const version = parseInt(THREE.REVISION.replace(/\D+/g, ''))
4
+
5
+// https://github.com/mrdoob/three.js/pull/26644
6
+// https://github.com/mrdoob/three.js/pull/28901
7
+const sRGBTransferOETF = version >= 167 ? 'sRGBTransferOETF' : 'LinearTosRGB'
8
9
const EffectCompositer = {
10
uniforms: {
11
sceneDiffuse: { value: null },
@@ -244,7 +250,7 @@ const EffectCompositer = {
244
250
}
245
251
#include <dithering_fragment>
246
252
if (gammaCorrection) {
247
- gl_FragColor = LinearTosRGB(gl_FragColor);
253
+ gl_FragColor = ${sRGBTransferOETF}(gl_FragColor);
248
254
249
255
256
`,
0 commit comments