mirror of https://github.com/sm64pc/sm64pc.git
Added better grayscale effect
This commit is contained in:
parent
0b6fe38a2e
commit
46a7965003
|
@ -105,11 +105,11 @@ namespace MoonInternal {
|
||||||
|
|
||||||
for(int x = 0; x < w * h * 4; x++){
|
for(int x = 0; x < w * h * 4; x++){
|
||||||
if (x % 4 == 0 ) // R
|
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
|
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
|
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
|
if (x % 4 == 3 ) // A
|
||||||
data[x] = data[x];
|
data[x] = data[x];
|
||||||
cpy[x] = data[x];
|
cpy[x] = data[x];
|
||||||
|
|
Loading…
Reference in New Issue