diff options
author | Silas Bartha <[email protected]> | 2024-11-21 12:19:49 -0500 |
---|---|---|
committer | Silas Bartha <[email protected]> | 2024-11-21 12:19:49 -0500 |
commit | c0488eed596e4c2fea2e154fc4b73870ad5e8583 (patch) | |
tree | 79fc4feb83847d85973f0dc15d6f9d4d9e04e165 | |
parent | 28c30b79f9a23ae85fa5fbc66c97c77967c576cf (diff) |
Tweak luma comparison
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | assets/shaders/dither_post_process.wgsl | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -1,6 +1,6 @@ [package] name = "bevy_dither_post_process" -version = "0.2.0" +version = "0.2.1" edition = "2021" description = "A post-process black and white ordered dithering effect for the Bevy game engine." license = "0BSD OR MIT OR Apache-2.0" diff --git a/assets/shaders/dither_post_process.wgsl b/assets/shaders/dither_post_process.wgsl index 6440d0d..47f6735 100644 --- a/assets/shaders/dither_post_process.wgsl +++ b/assets/shaders/dither_post_process.wgsl @@ -18,7 +18,7 @@ fn fragment( let base_color = textureSample(screen_texture, screen_sampler, in.uv); let luma = (0.2126 * base_color.r + 0.7152 * base_color.g + 0.0722 * base_color.b); - let value = f32(luma >= threshold); + let value = f32(luma > threshold); return vec4f(value, value, value, 1.0); } |