Skip to content

Commit 232a4cd

Browse files
authored
fix: Add support for sRGBTransferOETF to fix the runtime error 'LinearTosRGB' : no matching overloaded function found (#380)
1 parent 9d656b2 commit 232a4cd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/shaders/GammaCorrectionShader.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ export const GammaCorrectionShader: IGammaCorrectionShader = {
3737

3838
' vec4 tex = texture2D( tDiffuse, vUv );',
3939

40-
' gl_FragColor = LinearTosRGB( tex );',
40+
' #ifdef LinearTosRGB',
41+
' gl_FragColor = LinearTosRGB( tex );',
42+
' #else',
43+
' gl_FragColor = sRGBTransferOETF( tex );',
44+
' #endif',
4145

4246
'}',
4347
].join('\n'),

0 commit comments

Comments
 (0)