Skip to content

Commit

Permalink
fix: Add support for sRGBTransferOETF to fix the runtime error `'Line…
Browse files Browse the repository at this point in the history
…arTosRGB' : no matching overloaded function found` (#380)
  • Loading branch information
gumob authored Oct 7, 2024
1 parent 9d656b2 commit 232a4cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/shaders/GammaCorrectionShader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down

0 comments on commit 232a4cd

Please sign in to comment.