Skip to content

Commit

Permalink
Remove redundant pow in dither code
Browse files Browse the repository at this point in the history
  • Loading branch information
ledoge authored Jun 11, 2021
1 parent dbdc0b6 commit a8d1c9f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dwm_lut.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ char shaders[] = _STRINGIFY(
float noise = bayerTex.Sample(bayerSmp, pos / BAYER_SIZE).x;
float3 threshold = lerp(low_linear, high_linear, noise);

float3 dithered = lerp(low_linear, high_linear, rgb_linear > threshold);
return pow(dithered, 1.0 / DITHER_GAMMA);
return lerp(low, high, rgb_linear > threshold);
}

VS_OUTPUT VS(VS_INPUT input) {
Expand Down

0 comments on commit a8d1c9f

Please sign in to comment.