[vlc-commits] qml: specify the precision in FrostedGlassEffect shader
Pierre Lamot
git at videolan.org
Mon Sep 21 10:23:43 CEST 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Sep 10 17:47:34 2020 +0200| [4ece301e00765a7dbb1cc2d86d70a1079ac5a10d] | committer: Pierre Lamot
qml: specify the precision in FrostedGlassEffect shader
ANGLE expect the precision of all variable to be defined
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ece301e00765a7dbb1cc2d86d70a1079ac5a10d
---
modules/gui/qt/widgets/qml/FrostedGlassEffect.qml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/gui/qt/widgets/qml/FrostedGlassEffect.qml b/modules/gui/qt/widgets/qml/FrostedGlassEffect.qml
index d390825679..8d90803150 100644
--- a/modules/gui/qt/widgets/qml/FrostedGlassEffect.qml
+++ b/modules/gui/qt/widgets/qml/FrostedGlassEffect.qml
@@ -84,22 +84,22 @@ Rectangle {
uniform lowp float tintStrength;
- float rand(vec2 co){
+ mediump float rand(highp vec2 co){
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
}
- vec4 exclude(vec4 src, vec4 dst)
+ mediump vec4 exclude(mediump vec4 src, mediump vec4 dst)
{
return src + dst - 2.0 * src * dst;
}
void main() {
- float r = rand(qt_TexCoord0) - 0.5;
- vec4 noise = vec4(r,r,r,1.0) * noiseStrength;
- vec4 blured = texture2D(source, qt_TexCoord0);
+ mediump float r = rand(qt_TexCoord0) - 0.5;
+ mediump vec4 noise = vec4(r,r,r,1.0) * noiseStrength;
+ mediump vec4 blured = texture2D(source, qt_TexCoord0);
- vec4 exclColor = vec4(exclusionStrength, exclusionStrength, exclusionStrength, 0.0);
+ mediump vec4 exclColor = vec4(exclusionStrength, exclusionStrength, exclusionStrength, 0.0);
blured = exclude(blured, exclColor);
More information about the vlc-commits
mailing list