1
Graphics / How do I shift background to grayscale?
« on: May 02, 2020, 01:43:12 am »
Hi.
So I'm trying to create a warcraft II clone and I'd like to shift the gameplay's display to grayscale if the in game menu gets opened.
Here is a screenshot:
https://ibb.co/G31nhtX
github to full source (it's huge though): https://github.com/lori2001/Warcraft-II-HD
I found out I'd have to shift each pixel of the image to about this amount (y is a pixel in grayscale)
y=0.3R+0.6G+0.1B
I just have no idea how it's done. =)) Could you guys please help me out?
So I'm trying to create a warcraft II clone and I'd like to shift the gameplay's display to grayscale if the in game menu gets opened.
Here is a screenshot:
https://ibb.co/G31nhtX
github to full source (it's huge though): https://github.com/lori2001/Warcraft-II-HD
I found out I'd have to shift each pixel of the image to about this amount (y is a pixel in grayscale)
y=0.3R+0.6G+0.1B
I just have no idea how it's done. =)) Could you guys please help me out?