GNOME Bugzilla – Bug 767635
gleffects: fix little rectangel appears at the center when use squeeze and tunnel effects
Last modified: 2016-06-15 09:21:04 UTC
Should use highp precision, these two shader will calculate the verctor length and use it as denominator. But length could be zero which will cause undefine behaviour.
Created attachment 329755 [details] [review] fix squeeze and tunnel effects shader issue
Created attachment 329756 [details] The frames which has this issue
Couldn't that still be 0? Instead of that, maybe it should be set to a very small value if it is 0?
(In reply to Sebastian Dröge (slomo) from comment #3) > Couldn't that still be 0? Instead of that, maybe it should be set to a very > small value if it is 0? If Use mediump, the 0 area will be very large on some platform, e.g my i.mx6Q. But use highp, these area is very small too see.
(In reply to Sebastian Dröge (slomo) from comment #3) > Couldn't that still be 0? Instead of that, maybe it should be set to a very > small value if it is 0? Let me try to add a very small value to length.
Created attachment 329759 [details] [review] Add protection in case length could be 0
commit 5e8a650130d932a10b9dd8ae4f2cf7b4b714e472 Author: Haihua Hu <jared.hu@nxp.com> Date: Tue Jun 14 13:48:09 2016 +0800 gleffects: fix little rectangle that appears at the center of squeeze and tunnel effects These two shader will calculate the vector length and use it as denominator. But length could be zero which will cause undefine behaviour. Add protection for this condition https://bugzilla.gnome.org/show_bug.cgi?id=767635 and 1.8 0e395b5c620c0ca6e7189328de3d848f42dc443b