aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/scenegraph/openglunderqml/squircle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/quick/scenegraph/openglunderqml/squircle.cpp b/examples/quick/scenegraph/openglunderqml/squircle.cpp
index 8e34144af0..84509fb615 100644
--- a/examples/quick/scenegraph/openglunderqml/squircle.cpp
+++ b/examples/quick/scenegraph/openglunderqml/squircle.cpp
@@ -108,7 +108,7 @@ void Squircle::paint()
"uniform lowp float t;"
"varying highp vec2 coords;"
"void main() {"
- " lowp float i = 1. - (pow(coords.x, 4.) + pow(coords.y, 4.));"
+ " lowp float i = 1. - (pow(abs(coords.x), 4.) + pow(abs(coords.y), 4.));"
" i = smoothstep(t - 0.8, t + 0.8, i);"
" i = floor(i * 20.) / 20.;"
" gl_FragColor = vec4(coords * .5 + .5, i, i);"