diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-02-03 20:14:34 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-02-03 20:53:05 +0100 |
commit | 89c6efe4ec986d6bc3c1147fea260f882f04c66b (patch) | |
tree | f99dda8fab621431b9ac4bb6968f2dfc5a3f612b /chart2/opengl | |
parent | 3e2ffb053f9749c6f6990c5ce8f47dc63ea7c148 (diff) |
add the remaining symbols
Change-Id: I81b63d9e0e164e07cee3e10072a565e669b98196
Diffstat (limited to 'chart2/opengl')
-rw-r--r-- | chart2/opengl/symbolFragmentShader.glsl | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/chart2/opengl/symbolFragmentShader.glsl b/chart2/opengl/symbolFragmentShader.glsl index 2837f958af29..3ac6b0305285 100644 --- a/chart2/opengl/symbolFragmentShader.glsl +++ b/chart2/opengl/symbolFragmentShader.glsl @@ -37,37 +37,62 @@ void main() else if(p.y < 0 && abs(p.x) > 0.5) discard; } - else if(shape == 4) + else if(shape == 4) // arrow right { if(p.x > 0 && (abs(p.x) + abs(p.y)) > 1) discard; else if(p.x < 0 && abs(p.y) > 0.5) discard; } - else if(shape == 5) + else if(shape == 5) // arrow left { if(p.x < 0 && (abs(p.x) + abs(p.y)) > 1) discard; else if(p.x > 0 && abs(p.y) > 0.5) discard; } - else if(shape == 6) + else if(shape == 6) // hour glass { if(abs(p.x) < abs(p.y)) discard; } - else if(shape == 7) + else if(shape == 7) // bow tie { if(abs(p.y) < abs(p.x)) discard; } - else if(shape == 8) + else if(shape == 8) // circle { if(dot(p.x, p.y) > 1) discard; } - else if(shape == 9) + else if(shape == 9) // star { + if(sqrt(abs(p.x))+sqrt(abs(p.y)) > 1) + discard; + } + else if(shape == 10) // X + { + if(abs(abs(p.x) - abs(p.y)) > 0.2) + discard; + } + else if(shape == 11) // Plus + { + if(abs(p.x) > 0.2 && abs(p.y) > 0.2) + discard; + } + else if(shape == 12) // asterisk + { + } + else if(shape == 13) // horizontal bar + { + if(abs(p.y) > 0.2) + discard; + } + else if(shape == 14) // vertical bar + { + if(abs(p.x) > 0.2) + discard; } gl_FragColor = fragmentColor; |