// Much more efficient than the real thing, it also won't work with the glasses // greComp = green compensation vec4 rnb() { vec4 redSide = texture(tex, vec2(tex_coord.x * 0.99, tex_coord.y)); redSide.g = 0.0; redSide.b = 0.0; redSide.w = 0.333; vec4 bluSide = texture(tex, vec2(tex_coord.x / 0.99, tex_coord.y)); bluSide.r = 0.0; bluSide.g = 0.0; bluSide.w = 0.333; vec4 greComp = texture(tex, vec2(tex_coord.x, tex_coord.y)); greComp.r = 0.0; greComp.b = 0.0; greComp.w = 0.333; return redSide + bluSide + greComp; }
vec4 fake3Dv2() { vec4 col1 = texture(tex, vec2(tex_coord.x - 0.005, tex_coord.y)); col1 = vec4(0.0, col1.g, 0.0, 0.5); vec4 col2 = texture(tex, vec2(tex_coord.x + 0.005, tex_coord.y)); col2 = vec4(col2.r, 0.0, col2.r, 0.5); return col1 + col2; }
col2 = vec4(col2.r, 0.0, col2.b, 0.5);