D Haley 50e60e4
diff -r b759fc50f42e src/pixel.cpp
D Haley 50e60e4
--- a/src/pixel.cpp	Fri Feb 16 00:41:32 2018 +0000
D Haley 50e60e4
+++ b/src/pixel.cpp	Fri Feb 16 00:42:35 2018 +0000
D Haley 50e60e4
@@ -274,7 +274,7 @@
D Haley 50e60e4
 //	if(!r)	return r;	// NOTE r must be provided!
D Haley 50e60e4
 	if(p.a<=0)	{	memset(r,0,4);	return r;	}
D Haley 50e60e4
 	float b0=0,b1=0,b2=0, ar,ag,ab,dif;
D Haley 50e60e4
-	const size_t nl = p.sub>=0?p.sub:1-p.sub;
D Haley 50e60e4
+	const size_t nl = p.sub>=0?p.sub:-1-p.sub;
D Haley 50e60e4
 	const bool glob = !get(MGL_LOCAL_LIGHT);
D Haley 50e60e4
 	ar = ag = ab = glob?AmbBr:Sub[nl].AmbBr;
D Haley 50e60e4
 	dif = glob?DifBr:Sub[nl].DifBr;