Skip to content

Commit

Permalink
fix: Update LinearTosRGB to sRGBTransferOETF
Browse files Browse the repository at this point in the history
Former was deprecated apparently in three r156
  • Loading branch information
hi-liang committed Aug 9, 2024
1 parent 3868c47 commit f9c473a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/systems/postprocessing/passes/pixel-pass.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class RenderPixelatedPass extends Pass {
float Strength = dei > 0.0 ? (1.0 - depthEdgeStrength * dei) : (1.0 + normalEdgeStrength * nei);
gl_FragColor = texel * Strength;
if (isSRGB) {
gl_FragColor = LinearTosRGB(gl_FragColor);
gl_FragColor = sRGBTransferOETF(gl_FragColor);
}
}`,
});
Expand Down
2 changes: 1 addition & 1 deletion src/systems/postprocessing/shaders/CopyShader.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const CopyShader = {
gl_FragColor = texture2D( tDiffuse, vUv );
gl_FragColor.a *= opacity;
if (convertSRGB) {
gl_FragColor = LinearTosRGB(gl_FragColor);
gl_FragColor = sRGBTransferOETF(gl_FragColor);
}
}`,
};
Expand Down
2 changes: 1 addition & 1 deletion src/systems/postprocessing/shaders/DigitalGlitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const DigitalGlitch = {
gl_FragColor=texture2D (tDiffuse, vUv);
}
if (isSRGB) {
gl_FragColor = LinearTosRGB(gl_FragColor);
gl_FragColor = sRGBTransferOETF(gl_FragColor);
}
}`,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ void main() {

// force srgb
#ifdef IS_SRGB
localColor = LinearTosRGB(localColor);
localColor = sRGBTransferOETF(localColor);
#endif // IS_SRGB

vec4 color = localColor;
Expand Down

0 comments on commit f9c473a

Please sign in to comment.