eglglessink: Refactor REORDER shader.
Avoid unneededly calling texture2D() 3 consecutive times.
This commit is contained in:
parent
c91238a2af
commit
1eef329725
@ -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);"
|
|
||||||
"}"
|
"}"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user