Skip to content

Commit

Permalink
Fixed broken chroma range masking under Vulkan
Browse files Browse the repository at this point in the history
  • Loading branch information
Rectus committed Apr 24, 2023
1 parent 96e6ff5 commit 10ba13a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ float main(VS_OUTPUT input) : SV_TARGET

float3 difference = LinearRGBtoLAB_D65(color.xyz) - LinearRGBtoLAB_D65(g_maskedKey);

float2 distChromaSqr = pow(difference.yz, 2);
float2 distChromaSqr = float2(pow(difference.y, 2), pow(difference.z, 2));
float fracChromaSqr = pow(g_maskedFracChroma, 2);

float distChroma = smoothstep(fracChromaSqr, fracChromaSqr + pow(g_maskedSmooth, 2), (distChromaSqr.x + distChromaSqr.y));
Expand Down

0 comments on commit 10ba13a

Please sign in to comment.