I’ve recently been thinking about accessibility and ways of adding various aids to my games to make them more enjoyable / playable to gamers with physical disabilities.
So, first up, I’ve written a shader to simulate various forms of colour blindness and a little sample application that allows you to switch between 3 different forms of colour deficient vision: Protanopia (absence of red retinal photoreceptors), Deutanopia (absence of green) and Tritanopia (absence of blue).
Normal color vision is trichromatic. It is initiated by the absorption of photons in three classes of cones, the peak sensitivities of which lie in the long-wavelength (L), middle-wavelength (M), and short-wavelength (S) regions of the spectrum. Therefore any color stimulus can be specified by three numbers, the cone responses; and all colors visible to the color-normal observer are included in a three-dimensional color space. Reduced forms of color vision arise from the effective absence of one of the retinal photopigments of the L type in protanopes, the M type in deuteranopes, and the S type in tritanopes. For dichromatic observers any color stimulus initiates only two cone responses, and all colors that they can discriminate are included in a two-dimensional color space. Compared with trichromatic vision, dichromatic vision entails a loss of discrimination and results in a reduced color gamut.
If anybody is interested, the code can be found here:
The ‘magic’ numbers used in the shader were initially designed to work with older CRT monitors. I’m not sure how this will affect the filters when viewed on newer LCDs. I’m continuing research around this area and will post findings as and when.
Typically you would use as a post process filter to simulate how your game would look to dichromats.
Sometimes it is not possible, desirable or practical to alter artwork offline to cater for all gamers. So the next task is to create a post process component that can (in real time) dynamically alter the colour range of the final output so that it is more friendly to colour deficient players. This component could be turned on or off depending on a players needs (e.g off for a ‘normal vision’ gamer and on for a dichromat). The approach I’m attempting to take is outlined in the following paper: