All pastes #283479 Raw Edit

Anonymous

public c v1 · immutable
#283479 ·published 2006-12-18 11:13 UTC
rendered paste body
        const char *code =          "uniform sampler2D ytex, utex, vtex;\n"          "void main(void) {\n"          "  float r, g, b, y, u, v;\n"          "  y = texture2D(ytex, gl_TexCoord[0].st).r;\n"          "  u = texture2D(utex, gl_TexCoord[0].st).r;\n"          "  v = texture2D(vtex, gl_TexCoord[0].st).r;\n"          "  y = (y - 0.0625) * 1.164;\n"          "  u = u - 0.5;\n"          "  v = v - 0.5;\n"                    "  r = y + (1.402   * v);\n"          "  g = y - (0.34414 * u) - (0.71414 * v);\n"          "  b = y + (1.772   * u);\n"                    "  gl_FragColor = vec4(r, g, b, 1.0);\n"          "}\n";        glShaderSourceARB(fshad, 1, &code, NULL);