--- ray/src/cv/tmesh2rad.c 1994/06/22 12:35:58 2.8 +++ ray/src/cv/tmesh2rad.c 2003/02/22 02:07:23 2.10 @@ -1,9 +1,6 @@ -/* Copyright (c) 1994 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: tmesh2rad.c,v 2.10 2003/02/22 02:07:23 greg Exp $"; #endif - /* * Convert a trianglular mesh into a Radiance description. * @@ -211,7 +208,9 @@ register VERTEX *v1, *v2, *v3; if (comp_baryc(&bvecs, v1->pos, v2->pos, v3->pos) < 0) return; /* put out texture (if any) */ - if (v1->flags & v2->flags & v3->flags & V_HASNORM) { + if (v1->flags & v2->flags & v3->flags & V_HASNORM && + !flat_tri(v1->pos, v2->pos, v3->pos, + v1->nor, v2->nor, v3->nor)) { printf("\n%s texfunc %s\n", mod, TEXNAME); mod = TEXNAME; printf("4 dx dy dz %s\n", TCALNAME);