summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/cyngn/uicommon/rs/grayscale.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/cyngn/uicommon/rs/grayscale.rs b/src/com/cyngn/uicommon/rs/grayscale.rs
index c5d06aa..dd56f85 100644
--- a/src/com/cyngn/uicommon/rs/grayscale.rs
+++ b/src/com/cyngn/uicommon/rs/grayscale.rs
@@ -4,7 +4,7 @@
uchar4 __attribute__((kernel)) grayscale(uchar4 pixelIn, uint32_t x, uint32_t y) {
- uchar grayscale = pixelIn.r * 0.299 + pixelIn.g * 0.587 + pixelIn.b * 0.114;
+ uchar grayscale = pixelIn.r * 0.299f + pixelIn.g * 0.587f + pixelIn.b * 0.114f;
uchar4 pixelOut;
pixelOut.a = pixelIn.a;
@@ -13,4 +13,4 @@ uchar4 __attribute__((kernel)) grayscale(uchar4 pixelIn, uint32_t x, uint32_t y)
pixelOut.b = grayscale;
return pixelOut;
-} \ No newline at end of file
+}