Skip to content

Could I have some help with a red-green color blind shader? #25

Answered by lividhen
lividhen asked this question in Q&A
Discussion options

You must be logged in to vote

Got it working thanks to the resource you linked @loqusion !
Here is what I ended up with. If I could get feedback from people with different types or more intense red green color blindness that'd be great as mine is only very slight.

Shader
//Color blind shader for hyprland.
//Based off the shader :  https://godotshaders.com/shader/colorblindness-correction-shader/.

precision highp float;
varying vec2 v_texcoord;
uniform sampler2D tex;

//Intensity of filter (1.0 - 0.0)
const float intensity = 1.0;

// Color correction mode
// 0 - Protanopia
// 1 - Deutranopia
// 2 - Tritanopia
const int mode = 1;

void main()
{
  vec4 pixColor = texture2D(tex, v_texcoord);

  float L = (17.8824 * pixC…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@lividhen
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by lividhen
Comment options

You must be logged in to vote
1 reply
@lividhen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants