summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Niemelä <marko.a.niemela@nokia.com>2012-03-14 16:24:48 +0200
committerQt by Nokia <qt-info@nokia.com>2012-03-16 13:35:29 +0100
commit524c5c95512dd55c21cae5f6676db52b5e331efd (patch)
treee9a7e7b69244f111dbd829b2acbd517eeb12648d
parentc0018cc07cbad45e62bac8c8fab6a6469b86f902 (diff)
downloadqtgraphicaleffects-524c5c95512dd55c21cae5f6676db52b5e331efd.tar.gz
qtgraphicaleffects-524c5c95512dd55c21cae5f6676db52b5e331efd.tar.bz2
qtgraphicaleffects-524c5c95512dd55c21cae5f6676db52b5e331efd.zip
Added precision to all uniforms which did not have it.
If precision qualifier is missing, shader compilation may fail on some GPU:s. Change-Id: I8bad4855203ba9f0b233a877b1a012c608801bd6 Reviewed-by: Kim Gronholm <kim.1.gronholm@nokia.com>
-rw-r--r--src/effects/Blend.qml4
-rw-r--r--src/effects/BrightnessContrast.qml2
-rw-r--r--src/effects/ColorOverlay.qml2
-rw-r--r--src/effects/Colorize.qml2
-rw-r--r--src/effects/ConicalGradient.qml20
-rw-r--r--src/effects/Desaturate.qml2
-rw-r--r--src/effects/DirectionalBlur.qml2
-rw-r--r--src/effects/GammaAdjust.qml2
-rw-r--r--src/effects/LevelAdjust.qml2
-rw-r--r--src/effects/OpacityMask.qml4
-rw-r--r--src/effects/RadialBlur.qml2
-rw-r--r--src/effects/RecursiveBlur.qml2
-rw-r--r--src/effects/ThresholdMask.qml4
-rw-r--r--src/effects/ZoomBlur.qml2
-rw-r--r--src/effects/internal/GaussianDirectionalBlur.qml2
15 files changed, 27 insertions, 27 deletions
diff --git a/src/effects/Blend.qml b/src/effects/Blend.qml
index 64369fc..4d44651 100644
--- a/src/effects/Blend.qml
+++ b/src/effects/Blend.qml
@@ -147,8 +147,8 @@ Item {
property string fragmentShaderBegin: "
varying mediump vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D backgroundSource;
- uniform sampler2D foregroundSource;
+ uniform lowp sampler2D backgroundSource;
+ uniform lowp sampler2D foregroundSource;
highp float RGBtoL(highp vec3 color) {
highp float cmin = min(color.r, min(color.g, color.b));
diff --git a/src/effects/BrightnessContrast.qml b/src/effects/BrightnessContrast.qml
index badc65c..5e0f16a 100644
--- a/src/effects/BrightnessContrast.qml
+++ b/src/effects/BrightnessContrast.qml
@@ -75,7 +75,7 @@ Item {
fragmentShader: "
varying mediump vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
+ uniform lowp sampler2D source;
uniform highp float brightness;
uniform highp float contrast;
void main() {
diff --git a/src/effects/ColorOverlay.qml b/src/effects/ColorOverlay.qml
index 9eafdf3..387334c 100644
--- a/src/effects/ColorOverlay.qml
+++ b/src/effects/ColorOverlay.qml
@@ -72,7 +72,7 @@ Item {
fragmentShader: "
varying mediump vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
+ uniform lowp sampler2D source;
uniform highp vec4 color;
void main() {
highp vec4 pixelColor = texture2D(source, qt_TexCoord0);
diff --git a/src/effects/Colorize.qml b/src/effects/Colorize.qml
index efc25b5..02078eb 100644
--- a/src/effects/Colorize.qml
+++ b/src/effects/Colorize.qml
@@ -76,7 +76,7 @@ Item {
fragmentShader: "
varying mediump vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
+ uniform lowp sampler2D source;
uniform highp float hue;
uniform highp float saturation;
uniform highp float lightness;
diff --git a/src/effects/ConicalGradient.qml b/src/effects/ConicalGradient.qml
index d5dcfa0..f0b2f6b 100644
--- a/src/effects/ConicalGradient.qml
+++ b/src/effects/ConicalGradient.qml
@@ -100,13 +100,13 @@ Item {
property string noMaskShader: "
varying mediump vec2 qt_TexCoord0;
uniform lowp sampler2D gradientSource;
- uniform float qt_Opacity;
- uniform float startAngle;
- uniform vec2 center;
+ uniform highp float qt_Opacity;
+ uniform highp float startAngle;
+ uniform highp vec2 center;
void main() {
- const float PI = 3.14159265;
- const float PIx2inv = 0.1591549;
+ const highp float PI = 3.14159265;
+ const highp float PIx2inv = 0.1591549;
highp float a = (atan((center.y - qt_TexCoord0.t), (center.x - qt_TexCoord0.s)) + PI - startAngle) * PIx2inv;
gl_FragColor = texture2D(gradientSource, vec2(0.0, a)) * qt_Opacity;
}
@@ -116,14 +116,14 @@ Item {
varying mediump vec2 qt_TexCoord0;
uniform lowp sampler2D gradientSource;
uniform lowp sampler2D maskSource;
- uniform float qt_Opacity;
- uniform float startAngle;
- uniform vec2 center;
+ uniform highp float qt_Opacity;
+ uniform highp float startAngle;
+ uniform highp vec2 center;
void main() {
lowp float maskAlpha = texture2D(maskSource, qt_TexCoord0).a;
- const float PI = 3.14159265;
- const float PIx2inv = 0.1591549;
+ const highp float PI = 3.14159265;
+ const highp float PIx2inv = 0.1591549;
highp float a = (atan((center.y - qt_TexCoord0.t), (center.x - qt_TexCoord0.s)) + PI - startAngle) * PIx2inv;
gl_FragColor = texture2D(gradientSource, vec2(0.0, a)) * maskAlpha * qt_Opacity;
}
diff --git a/src/effects/Desaturate.qml b/src/effects/Desaturate.qml
index 4fe91f5..87c7dac 100644
--- a/src/effects/Desaturate.qml
+++ b/src/effects/Desaturate.qml
@@ -72,7 +72,7 @@ Item {
fragmentShader: "
varying highp vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
+ uniform lowp sampler2D source;
uniform highp float desaturation;
void main(void) {
lowp vec4 textureColor = texture2D(source, qt_TexCoord0.st);
diff --git a/src/effects/DirectionalBlur.qml b/src/effects/DirectionalBlur.qml
index ee12b1a..47cc2ac 100644
--- a/src/effects/DirectionalBlur.qml
+++ b/src/effects/DirectionalBlur.qml
@@ -85,7 +85,7 @@ Item {
property string fragmentShaderSkeleton: "
varying highp vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
+ uniform lowp sampler2D source;
uniform highp float len;
uniform highp float samples;
uniform highp float weight;
diff --git a/src/effects/GammaAdjust.qml b/src/effects/GammaAdjust.qml
index 757c4ac..ef017ab 100644
--- a/src/effects/GammaAdjust.qml
+++ b/src/effects/GammaAdjust.qml
@@ -72,7 +72,7 @@ Item {
fragmentShader: "
varying highp vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
+ uniform lowp sampler2D source;
uniform highp float gamma;
void main(void) {
highp vec4 originalColor = texture2D(source, qt_TexCoord0.st);
diff --git a/src/effects/LevelAdjust.qml b/src/effects/LevelAdjust.qml
index b71fedd..434b15d 100644
--- a/src/effects/LevelAdjust.qml
+++ b/src/effects/LevelAdjust.qml
@@ -83,7 +83,7 @@ Item {
fragmentShader: "
varying highp vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
+ uniform lowp sampler2D source;
uniform highp vec3 minimumInputRGB;
uniform highp vec3 maximumInputRGB;
uniform highp float minimumInputAlpha;
diff --git a/src/effects/OpacityMask.qml b/src/effects/OpacityMask.qml
index d338350..4ea63e8 100644
--- a/src/effects/OpacityMask.qml
+++ b/src/effects/OpacityMask.qml
@@ -77,8 +77,8 @@ Item {
fragmentShader: "
varying highp vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
- uniform sampler2D maskSource;
+ uniform lowp sampler2D source;
+ uniform lowp sampler2D maskSource;
void main(void) {
gl_FragColor = texture2D(source, qt_TexCoord0.st) * (texture2D(maskSource, qt_TexCoord0.st).a) * qt_Opacity;
}
diff --git a/src/effects/RadialBlur.qml b/src/effects/RadialBlur.qml
index b19d685..aff3c3d 100644
--- a/src/effects/RadialBlur.qml
+++ b/src/effects/RadialBlur.qml
@@ -92,7 +92,7 @@ Item {
property string fragmentShaderSkeleton: "
varying highp vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
+ uniform lowp sampler2D source;
uniform highp float angleSin;
uniform highp float angleCos;
uniform highp float angleSinStep;
diff --git a/src/effects/RecursiveBlur.qml b/src/effects/RecursiveBlur.qml
index e50cd0b..52a01b2 100644
--- a/src/effects/RecursiveBlur.qml
+++ b/src/effects/RecursiveBlur.qml
@@ -125,7 +125,7 @@ Item {
fragmentShader: "
varying mediump vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
+ uniform lowp sampler2D source;
void main() {
gl_FragColor = texture2D(source, qt_TexCoord0) * qt_Opacity;
}
diff --git a/src/effects/ThresholdMask.qml b/src/effects/ThresholdMask.qml
index 9373a5e..5f995d7 100644
--- a/src/effects/ThresholdMask.qml
+++ b/src/effects/ThresholdMask.qml
@@ -81,8 +81,8 @@ Item {
fragmentShader: "
varying highp vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
- uniform sampler2D maskSource;
+ uniform lowp sampler2D source;
+ uniform lowp sampler2D maskSource;
uniform highp float threshold;
uniform highp float spread;
void main(void) {
diff --git a/src/effects/ZoomBlur.qml b/src/effects/ZoomBlur.qml
index 2e80980..83c6173 100644
--- a/src/effects/ZoomBlur.qml
+++ b/src/effects/ZoomBlur.qml
@@ -87,7 +87,7 @@ Item {
property string fragmentShaderSkeleton: "
varying highp vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
+ uniform lowp sampler2D source;
uniform highp float len;
uniform highp float weight;
uniform highp float samples;
diff --git a/src/effects/internal/GaussianDirectionalBlur.qml b/src/effects/internal/GaussianDirectionalBlur.qml
index 50b5d14..5515a96 100644
--- a/src/effects/internal/GaussianDirectionalBlur.qml
+++ b/src/effects/internal/GaussianDirectionalBlur.qml
@@ -241,7 +241,7 @@ Item {
property string fragmentShaderBegin: "
varying mediump vec2 qt_TexCoord0;
uniform highp float qt_Opacity;
- uniform sampler2D source;
+ uniform lowp sampler2D source;
uniform highp vec3 delta;
uniform highp vec3 factor_0_2;
uniform highp vec3 factor_3_5;