draw overlay hover bar

This commit is contained in:
josh committed 2012-09-23 15:17:45 -04:00
1 parent 3e178b4d97
commit 24ee6b011e
3 files changed
+73 -3

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
varying vec3 pos_i;
const vec4 red = vec4(1, 0, 0, 1);
const vec4 yellow = vec4(1, 1, 0, 1);
const vec4 green = vec4(0, 1, 0, 1);
void main(void)
{
if (pos_i.x < 0)
{
gl_FragColor = mix(red, yellow, pos_i.x + 1);
}
else
{
gl_FragColor = mix(yellow, green, pos_i.x);
}
}