From a23e3b9c9e160a0bbf01bf45eb74d814ff3538e4 Mon Sep 17 00:00:00 2001 From: Haihua Hu Date: Tue, 8 Dec 2015 14:09:58 +0800 Subject: 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 Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=761271 --- ext/gl/effects/gstgleffectssources.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);" "}"; -- cgit v1.2.1