Skip to content

Commit

Permalink
ColorAdjustmentNode: Correct lumaCoeffs. (#28861)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Jul 13, 2024
1 parent a60450e commit b999622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nodes/display/ColorAdjustmentNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const saturation = nodeProxy( ColorAdjustmentNode, ColorAdjustmentNode.SA
export const vibrance = nodeProxy( ColorAdjustmentNode, ColorAdjustmentNode.VIBRANCE );
export const hue = nodeProxy( ColorAdjustmentNode, ColorAdjustmentNode.HUE );

export const lumaCoeffs = vec3( 0.2125, 0.7154, 0.0721 );
export const lumaCoeffs = vec3( 0.2126729, 0.7151522, 0.0721750 ); // // assumes rgb is in linear color space with sRGB primaries and D65 white point
export const luminance = ( color, luma = lumaCoeffs ) => dot( color, luma );

export const threshold = ( color, threshold ) => mix( vec3( 0.0 ), color, luminance( color ).sub( threshold ).max( 0 ) );
Expand Down

0 comments on commit b999622

Please sign in to comment.