diff options
author | Alessandro Portale <alessandro.portale@theqtcompany.com> | 2016-05-19 09:59:58 +0200 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@theqtcompany.com> | 2016-05-23 09:37:51 +0000 |
commit | 46e043ed1ed273b2dd8b4a000f6644c8ca1d09f1 (patch) | |
tree | d2602e49610eccca11c3869e9d0aa6202ed48264 /src | |
parent | 46cacd901aafa701020facbd6421da20f726425d (diff) | |
download | qt-creator-46e043ed1ed273b2dd8b4a000f6644c8ca1d09f1.tar.gz |
Timeline: Crisper selection rectangles
This change removes the "mini gradient" between outline and filling.
At least in HighDPI, this gives a crisper impression.
Change-Id: I15b97393a8650c28dc52a38d4d106adc95ce261c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/timeline/qml/timelineitems.frag | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libs/timeline/qml/timelineitems.frag b/src/libs/timeline/qml/timelineitems.frag index f1908e43bb..97d79770f6 100644 --- a/src/libs/timeline/qml/timelineitems.frag +++ b/src/libs/timeline/qml/timelineitems.frag @@ -32,16 +32,13 @@ varying lowp vec3 edgeColor; varying lowp vec3 color; varying lowp vec2 barycentric; -lowp vec4 zero = vec4(0.0); void main() { - lowp vec2 d = fwidth(barycentric) * 5.0; - lowp vec4 edge_closeness = smoothstep(zero, vec4(d.x, d.y, d.x, d.y), + lowp vec2 d = fwidth(barycentric) * 4.0; + lowp vec4 edge_closeness = step(vec4(d.x, d.y, d.x, d.y), vec4(barycentric.x, barycentric.y, 1.0 - barycentric.x, 1.0 - barycentric.y)); lowp float total = min(min(edge_closeness[0], edge_closeness[1]), min(edge_closeness[2], edge_closeness[3])); - // square to make lines sharper - total = total > 0.5 ? (1.0 - (1.0 - total) * (1.0 - total) * 2.0) : total * total * 2.0; gl_FragColor.rgb = mix(edgeColor, color, total); gl_FragColor.a = 1.0; } |