summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaihua Hu <b55597@freescale.com>2015-12-08 14:09:58 +0800
committerMatthew Waters <matthew@centricular.com>2016-01-29 14:33:48 +1100
commita23e3b9c9e160a0bbf01bf45eb74d814ff3538e4 (patch)
tree0f7aade51e11480c50fe162a878b419971c44940
parent6520a2c6866203d0e141ef7987de10cd6fc38b8f (diff)
downloadgstreamer-plugins-bad-a23e3b9c9e160a0bbf01bf45eb74d814ff3538e4.tar.gz
gleffects: fix gleffects fisheye shader compile error
On some embedded systems, sqrt() is not supported in the shader, use the actual value of sqrt(2) instead. Signed-off-by: Haihua Hu <b55597@freescale.com> Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=761271
-rw-r--r--ext/gl/effects/gstgleffectssources.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/gl/effects/gstgleffectssources.c b/ext/gl/effects/gstgleffectssources.c
index 3da856ce1..6bdc15586 100644
--- a/ext/gl/effects/gstgleffectssources.c
+++ b/ext/gl/effects/gstgleffectssources.c
@@ -152,7 +152,7 @@ const gchar *fisheye_fragment_source_gles2 =
" vec2 normcoord;"
" normcoord = texturecoord - 0.5;"
" float r = length (normcoord);"
- " normcoord *= r * sqrt(2);"
+ " normcoord *= r * 1.41421;" /* sqrt (2) */
" texturecoord = normcoord + 0.5;"
" gl_FragColor = texture2D (tex, texturecoord);"
"}";