diff --git a/src/shaders/GammaCorrectionShader.ts b/src/shaders/GammaCorrectionShader.ts index 4e194ea9..00f0425d 100644 --- a/src/shaders/GammaCorrectionShader.ts +++ b/src/shaders/GammaCorrectionShader.ts @@ -37,7 +37,11 @@ export const GammaCorrectionShader: IGammaCorrectionShader = { ' vec4 tex = texture2D( tDiffuse, vUv );', - ' gl_FragColor = LinearTosRGB( tex );', + ' #ifdef LinearTosRGB', + ' gl_FragColor = LinearTosRGB( tex );', + ' #else', + ' gl_FragColor = sRGBTransferOETF( tex );', + ' #endif', '}', ].join('\n'),