Increase epsilon for RGB2HCV to fix mobile NaN

Some mobile GPUs end up dividing by "zero" with the previous epsilon
value. The larger epsilon doesn't cause any problems on systems which
didn't exhibit the bug (like my main dev machine).
This commit is contained in:
Christopher Willis-Ford
2017-12-04 15:31:18 -08:00
parent cde61630ab
commit e83673ffb8

View File

@@ -44,7 +44,7 @@ varying vec2 v_texCoord;
// http://www.chilliant.com/rgb2hsv.html by Ian Taylor
// Based in part on work by Sam Hocevar and Emil Persson
const float kEpsilon = 1e-6;
const float kEpsilon = 1e-4;
vec3 convertRGB2HCV(vec3 rgb)
{