diff --git a/src/libs/timeline/qml/notes.frag b/src/libs/timeline/qml/notes.frag index 472c0174db0..72ecfa93718 100644 --- a/src/libs/timeline/qml/notes.frag +++ b/src/libs/timeline/qml/notes.frag @@ -28,8 +28,8 @@ ** ****************************************************************************/ -vec4 orange = vec4(1.0, 165.0 / 255.0, 0.0, 1.0); -varying float d; +lowp vec4 orange = vec4(1.0, 165.0 / 255.0, 0.0, 1.0); +varying lowp float d; void main() { diff --git a/src/libs/timeline/qml/timelineitems.frag b/src/libs/timeline/qml/timelineitems.frag index 0ee0ad2aba6..5f44fbcf019 100644 --- a/src/libs/timeline/qml/timelineitems.frag +++ b/src/libs/timeline/qml/timelineitems.frag @@ -28,17 +28,22 @@ ** ****************************************************************************/ +#ifdef GL_OES_standard_derivatives +#extension GL_OES_standard_derivatives : enable +// else we probably have fwidth() in core +#endif + varying lowp vec3 edgeColor; varying lowp vec3 color; varying lowp vec2 barycentric; -vec4 zero = vec4(0.0); +lowp vec4 zero = vec4(0.0); void main() { - vec2 d = fwidth(barycentric) * 5.0; - vec4 edge_closeness = smoothstep(zero, vec4(d.x, d.y, d.x, d.y), + lowp vec2 d = fwidth(barycentric) * 5.0; + lowp vec4 edge_closeness = smoothstep(zero, vec4(d.x, d.y, d.x, d.y), vec4(barycentric.x, barycentric.y, 1.0 - barycentric.x, 1.0 - barycentric.y)); - float total = min(min(edge_closeness[0], edge_closeness[1]), + 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; diff --git a/src/libs/timeline/qml/timelineitems.vert b/src/libs/timeline/qml/timelineitems.vert index 58f28b558a9..cea5b49cd42 100644 --- a/src/libs/timeline/qml/timelineitems.vert +++ b/src/libs/timeline/qml/timelineitems.vert @@ -47,13 +47,13 @@ void main() gl_Position = matrix * vertexCoord; // Make very narrow events somewhat wider so that they don't collapse into 0 pixels - highp float scaledWidth = scale.x * rectSize.x; - highp float shift = sign(scaledWidth) * max(0, 3.0 - abs(scaledWidth)) * 0.0005; + float scaledWidth = scale.x * rectSize.x; + float shift = sign(scaledWidth) * max(0.0, 3.0 - abs(scaledWidth)) * 0.0005; gl_Position.x += shift; // Ditto for events with very small height - highp float scaledHeight = scale.y * rectSize.y; - gl_Position.y += float(rectSize.y > 0.0) * max(0, 3.0 - scaledHeight) * 0.003; + float scaledHeight = scale.y * rectSize.y; + gl_Position.y += float(rectSize.y > 0.0) * max(0.0, 3.0 - scaledHeight) * 0.003; barycentric = vec2(rectSize.x > 0.0 ? 1.0 : 0.0, rectSize.y > 0.0 ? 1.0 : 0.0); color = vertexColor.rgb; diff --git a/src/plugins/qmlprofiler/qml/bindingloops.frag b/src/plugins/qmlprofiler/qml/bindingloops.frag index 8f364adea43..135252ea9d7 100644 --- a/src/plugins/qmlprofiler/qml/bindingloops.frag +++ b/src/plugins/qmlprofiler/qml/bindingloops.frag @@ -28,7 +28,7 @@ ** ****************************************************************************/ -vec4 orange = vec4(1.0, 165.0 / 255.0, 0.0, 1.0); +lowp vec4 orange = vec4(1.0, 165.0 / 255.0, 0.0, 1.0); void main() { gl_FragColor = orange;