From 46a7965003b493de22e499e68c7b8ad8aca0e378 Mon Sep 17 00:00:00 2001 From: KiritoDev Date: Wed, 9 Jun 2021 20:31:02 -0500 Subject: [PATCH] Added better grayscale effect --- src/moon/mod-engine/textures/mod-texture.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/moon/mod-engine/textures/mod-texture.cpp b/src/moon/mod-engine/textures/mod-texture.cpp index 61a27efb..1a0e7fa4 100644 --- a/src/moon/mod-engine/textures/mod-texture.cpp +++ b/src/moon/mod-engine/textures/mod-texture.cpp @@ -105,11 +105,11 @@ namespace MoonInternal { for(int x = 0; x < w * h * 4; x++){ if (x % 4 == 0 ) // R - data[x] = (data[x] * mr + data[x + 1] * mg + data[x + 2] * mb); + data[x] = (data[x + 1]); if (x % 4 == 1 ) // G - data[x] = (data[x - 1] * mr + data[x] * mg + data[x + 1] * mb); + data[x] = (data[x]); if (x % 4 == 2 ) // B - data[x] = (data[x - 2] * mr + data[x - 1] * mg + data[x] * mb); + data[x] = (data[x - 1]); if (x % 4 == 3 ) // A data[x] = data[x]; cpy[x] = data[x];