diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2013-03-18 09:12:43 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-18 09:15:24 +0100 |
commit | bb803baa360f24f9a01e1cb1652962476724dd2d (patch) | |
tree | f4e7ff683e8668062f9088f7c6de1d1bbbc07e1c /examples | |
parent | b7032bed6799c72ef8d89e5763586349b6991b93 (diff) |
Fixed invalid GLSL in openglunderqml example.
First argument to pow is not allowed to be negative.
Task-number: QTBUG-30191
Change-Id: Iac6c25d84e26777564d6741690aab552a0bb513e
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quick/scenegraph/openglunderqml/squircle.cpp | 2 |
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);" |