summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@sletta.org>2015-08-28 09:51:28 +0200
committerMitch Curtis <mitch.curtis@theqtcompany.com>2015-08-28 07:59:27 +0000
commit47defda4857627bd40834a946529c7eae3ba8b10 (patch)
treeaeeec862149e6608d89355aaeef340b3ffd48822
parent59a0e6f0b7e7c345b0328d9d66e503cfb1f94ebe (diff)
downloadqtgraphicaleffects-47defda4857627bd40834a946529c7eae3ba8b10.tar.gz
Rename uniform step->dirstep to avoid conflicts with built-in
Change-Id: Ifcffcaf3d057162bb6eb8af9cd3c2277bc5bf206 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
-rw-r--r--src/effects/GaussianBlur.qml4
-rw-r--r--src/effects/private/qgfxshaderbuilder.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/effects/GaussianBlur.qml b/src/effects/GaussianBlur.qml
index 6c53717..82bc290 100644
--- a/src/effects/GaussianBlur.qml
+++ b/src/effects/GaussianBlur.qml
@@ -316,7 +316,7 @@ Item {
// Used by all shaders
property Item source: sourceProxy.output;
property real spread: root.radius / root._kernelRadius;
- property var step: Qt.vector2d(1 / (root._paddedTexWidth * root._dpr), 0);
+ property var dirstep: Qt.vector2d(1 / (root._paddedTexWidth * root._dpr), 0);
// Used by fallback shader (sampleCount exceeds number of varyings)
property real deviation: root.deviation
@@ -349,7 +349,7 @@ Item {
property Item source: horizontalBlur
property real spread: horizontalBlur.spread
- property var step: Qt.vector2d(0, 1 / (root._paddedTexHeight * root._dpr));
+ property var dirstep: Qt.vector2d(0, 1 / (root._paddedTexHeight * root._dpr));
property real deviation: horizontalBlur.deviation
property real radius: horizontalBlur.radius
diff --git a/src/effects/private/qgfxshaderbuilder.cpp b/src/effects/private/qgfxshaderbuilder.cpp
index 9a109b0..0d04681 100644
--- a/src/effects/private/qgfxshaderbuilder.cpp
+++ b/src/effects/private/qgfxshaderbuilder.cpp
@@ -219,7 +219,7 @@ QByteArray qgfx_gaussianVertexShader(QGfxGaussSample *p, int samples)
"attribute highp vec2 qt_MultiTexCoord0;\n\n"
"uniform highp mat4 qt_Matrix;\n"
"uniform highp float spread;\n"
- "uniform highp vec2 step;\n\n";
+ "uniform highp vec2 dirstep;\n\n";
qgfx_declareBlurVaryings(shader, p, samples);
@@ -231,7 +231,7 @@ QByteArray qgfx_gaussianVertexShader(QGfxGaussSample *p, int samples)
shader += p[i].name;
shader += " = qt_MultiTexCoord0";
if (p[i].pos != 0.0) {
- shader += " + spread * step * float(";
+ shader += " + spread * dirstep * float(";
shader += QByteArray::number(p[i].pos);
shader += ')';
}
@@ -313,7 +313,7 @@ QVariantMap QGfxShaderBuilder::gaussianBlur(const QJSValue &parameters)
"uniform highp sampler2D source;\n"
"uniform lowp float qt_Opacity;\n"
"uniform mediump float spread;\n"
- "uniform highp vec2 step;\n";
+ "uniform highp vec2 dirstep;\n";
if (alphaOnly) {
fragShader += "uniform lowp vec4 color;\n"
"uniform lowp float thickness;\n";
@@ -327,7 +327,7 @@ QVariantMap QGfxShaderBuilder::gaussianBlur(const QJSValue &parameters)
fragShader += " mediump float result = 0.0;\n";
else
fragShader += " mediump vec4 result = vec4(0);\n";
- fragShader += " highp vec2 pixelStep = step * spread;\n";
+ fragShader += " highp vec2 pixelStep = dirstep * spread;\n";
if (masked)
fragShader += " pixelStep *= texture2D(mask, qt_TexCoord0).a;\n";