// Deuteranopia -- green-blind. // // Panama's accessibility color filters. Selected by the `colorFilter` // preference; hypr/looks.lua maps the enum to this path at config time and // services/SystemSettings.qml does the same live. // // Same family of matrices as protanopia.frag, weighted for the missing green // cone instead of the red one. See that file for why this is a correction // rather than a simulation, and for the column-major note. #version 300 es precision mediump float; in vec2 v_texcoord; layout(location = 0) out vec4 fragColor; uniform sampler2D tex; const mat3 deuteranopia = mat3( 0.625, 0.700, 0.000, 0.375, 0.300, 0.300, 0.000, 0.000, 0.700 ); void main() { vec4 pixColor = texture(tex, v_texcoord); fragColor = vec4(clamp(deuteranopia * pixColor.rgb, 0.0, 1.0), pixColor.a); }