summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager_p.h2
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadersource_p.h2
-rw-r--r--src/opengl/qglpixmapfilter.cpp2
-rw-r--r--src/opengl/qgraphicsshadereffect.cpp10
4 files changed, 8 insertions, 8 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
index d5241a8..ace6b63 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h
@@ -209,7 +209,7 @@
(QGLCustomShaderStage). The shader will implement a pre-defined method name
which Qt's fragment pipeline will call:
- lowp vec4 customShader(sampler2d src, vec2 srcCoords)
+ lowp vec4 customShader(lowp sampler2d imageTexture, highp vec2 textureCoords)
The provided src and srcCoords parameters can be used to sample from the
source image.
diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
index cf930f3..a8e2e72 100644
--- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
@@ -293,7 +293,7 @@ static const char* const qglslImageSrcFragmentShader = "\
static const char* const qglslCustomSrcFragmentShader = "\
varying highp vec2 textureCoords; \
uniform sampler2D imageTexture; \
- lowp vec4 customShader(sampler2D texture, vec2 coords); \
+ lowp vec4 customShader(lowp sampler2D texture, highp vec2 coords); \
lowp vec4 srcPixel() { \
return customShader(imageTexture, textureCoords); \
}";
diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp
index e1ee61a..df7811e 100644
--- a/src/opengl/qglpixmapfilter.cpp
+++ b/src/opengl/qglpixmapfilter.cpp
@@ -418,7 +418,7 @@ QByteArray QGLPixmapBlurFilter::generateBlurShader(int radius, bool gaussianBlur
source.append("uniform highp vec4 clip;\n");
}
- source.append("lowp vec4 customShader(sampler2D src, vec2 srcCoords) {\n");
+ source.append("lowp vec4 customShader(lowp sampler2D src, highp vec2 srcCoords) {\n");
QVector<qreal> sampleOffsets;
QVector<qreal> weights;
diff --git a/src/opengl/qgraphicsshadereffect.cpp b/src/opengl/qgraphicsshadereffect.cpp
index d3f52f6..5e37d62 100644
--- a/src/opengl/qgraphicsshadereffect.cpp
+++ b/src/opengl/qgraphicsshadereffect.cpp
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
The specific effect is defined by a fragment of GLSL source code
supplied to setPixelShaderFragment(). This source code must define a
function with the signature
- \c{lowp vec4 customShader(sampler2D imageTexture, vec2 textureCoords)}
+ \c{lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords)}
that returns the source pixel value
to use in the paint engine's shader program. The shader fragment
is linked with the regular shader code used by the GL2 paint engine
@@ -77,7 +77,7 @@ QT_BEGIN_NAMESPACE
\code
static char const colorizeShaderCode[] =
"uniform lowp vec4 effectColor;\n"
- "lowp vec4 customShader(sampler2D imageTexture, vec2 textureCoords) {\n"
+ "lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) {\n"
" vec4 src = texture2D(imageTexture, textureCoords);\n"
" float gray = dot(src.rgb, vec3(0.212671, 0.715160, 0.072169));\n"
" vec4 colorize = 1.0-((1.0-gray)*(1.0-effectColor));\n"
@@ -130,7 +130,7 @@ QT_BEGIN_NAMESPACE
*/
static const char qglslDefaultImageFragmentShader[] = "\
- lowp vec4 customShader(sampler2D imageTexture, vec2 textureCoords) { \
+ lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) { \
return texture2D(imageTexture, textureCoords); \
}\n";
@@ -215,13 +215,13 @@ QByteArray QGraphicsShaderEffect::pixelShaderFragment() const
this shader effect to \a code.
The \a code must define a GLSL function with the signature
- \c{lowp vec4 customShader(sampler2D imageTexture, vec2 textureCoords)}
+ \c{lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords)}
that returns the source pixel value to use in the paint engine's
shader program. The following is the default pixel shader fragment,
which draws a pixmap with no effect applied:
\code
- lowp vec4 customShader(sampler2D imageTexture, vec2 textureCoords) {
+ lowp vec4 customShader(lowp sampler2D imageTexture, highp vec2 textureCoords) {
return texture2D(imageTexture, textureCoords);
}
\endcode