Skip to content

Instantly share code, notes, and snippets.

View TheOtterlord's full-sized avatar
🦦

Reuben Tier TheOtterlord

🦦
View GitHub Profile
@TheOtterlord
TheOtterlord / red.frag
Created September 1, 2024 10:50
Monochromatic red shader
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
void main() {
vec4 pixColor = texture2D(tex, v_texcoord);
// calculate the perceived brightness (https://www.101computing.net/colour-luminance-and-contrast-ratio/)
vec4 luminance = pixColor * vec4(0.2126, 0.7152, 0.0722, 1.0);