clray

diff rt.cl @ 21:bd6c2b25f6e7

fixed, now we need to start with optimizations
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 10 Aug 2010 07:24:18 +0100
parents 63a6b46f58a0
children 6c44e4b1726d
line diff
     1.1 --- a/rt.cl	Mon Aug 09 12:55:40 2010 +0100
     1.2 +++ b/rt.cl	Tue Aug 10 07:24:18 2010 +0100
     1.3 @@ -53,7 +53,7 @@
     1.4  };
     1.5  
     1.6  #define MIN_ENERGY	0.001
     1.7 -#define EPSILON		1e-6
     1.8 +#define EPSILON		1e-5
     1.9  
    1.10  float4 shade(struct Ray ray, struct Scene *scn, const struct SurfPoint *sp);
    1.11  bool find_intersection(struct Ray ray, const struct Scene *scn, struct SurfPoint *sp);
    1.12 @@ -204,7 +204,7 @@
    1.13  
    1.14  	sp->t = t;
    1.15  	sp->pos = pt;
    1.16 -	sp->norm = -normalize(face->v[0].normal * bc.x + face->v[1].normal * bc.y + face->v[2].normal * bc.z);
    1.17 +	sp->norm = normalize(face->v[0].normal * bc.x + face->v[1].normal * bc.y + face->v[2].normal * bc.z);
    1.18  	sp->obj = face;
    1.19  	sp->dbg = bc;
    1.20  	return true;