eglglessink: Refactor REORDER shader.

Avoid unneededly calling texture2D() 3 consecutive times.
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2012-10-08 12:10:25 -03:00 committed by Sebastian Dröge
parent c91238a2af
commit 1eef329725

View file

@ -161,11 +161,8 @@ static const char *frag_REORDER_prog = {
"uniform sampler2D tex;" "uniform sampler2D tex;"
"void main(void)" "void main(void)"
"{" "{"
" float r, g, b;" " vec4 t = texture2D(tex, opos);"
" r = texture2D(tex, opos).%c;" " gl_FragColor = vec4(t.%c, t.%c, t.%c, 1.0);"
" g = texture2D(tex, opos).%c;"
" b = texture2D(tex, opos).%c;"
" gl_FragColor = vec4(r, g, b, 1.0);"
"}" "}"
}; };