diff --git a/examples/jsm/shaders/GammaCorrectionShader.js b/examples/jsm/shaders/GammaCorrectionShader.js index ca0732605d92f8..719960497b6008 100644 --- a/examples/jsm/shaders/GammaCorrectionShader.js +++ b/examples/jsm/shaders/GammaCorrectionShader.js @@ -34,7 +34,7 @@ const GammaCorrectionShader = { vec4 tex = texture2D( tDiffuse, vUv ); - gl_FragColor = LinearTosRGB( tex ); + gl_FragColor = sRGBTransferOETF( tex ); }` diff --git a/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.js b/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.js index fa35caeab28dc2..53c28873685215 100644 --- a/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.js +++ b/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.js @@ -29,4 +29,9 @@ vec4 LinearTransferOETF( in vec4 value ) { vec4 sRGBTransferOETF( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); } + +// @deprecated, r156 +vec4 LinearTosRGB( in vec4 value ) { + return sRGBTransferOETF( value ); +} `;