anchor.diff:    result = traverseTree(ray);
     Triangle tri = createTriangle(result.index);
     vec3 origin = ray.origin + ray.dir * result.t;
  -  Triangle light = randomLight();
  -  vec3 lightPoint = randomPointOnTriangle(light);
  +  Triangle light = randomLight(origin.xz);
  +  vec3 lightPoint = randomPointOnTriangle(light, origin.zy);
     vec3 dir = normalize(lightPoint - origin);
     vec3 normal = barycentricNormal(createTriangle(result.index), createNormals(result.index), origin);
  -  Hit shadow = traverseTree(Ray(origin + normal*EPSILON, dir));
  -  color = createMaterial(shadow.index).emittance;
  +  ray = Ray(origin + normal*EPSILON, dir);
  +  Hit shadow = traverseTree(ray);
  +  Material mat = createMaterial(shadow.index);
  +  if(result.index > -1.0 && dot(mat.emittance, vec3(1)) > 0.0){
  +    vec3 lightNormal = barycentricNormal(createTriangle(shadow.index), createNormals(shadow.index), origin);
  +    vec3 p = ray.origin + ray.dir * shadow.t;
  +    color = dot(ray.dir, normal) * mat.emittance * attenuationFactor(ray, light, p, lightNormal) / numLights;
  +  }
  +
     fragColor = clamp(vec4((color + (tcolor * float(tick)))/(float(tick)+1.0),1.0),vec4(0), vec4(1));
   }
  
positive.code: 	vec3 top =  pct.x * (rightMax - leftMax) + leftMax;
  	vec3 bottom =  pct.x * (rightMin - leftMin) + leftMin;
  	return pct.y * (top - bottom) + bottom;
  }
  
  void main(void) {
  
negative.code:   float a = 12.9898;
    float b = 78.233;
    float c = 43758.5453;
    float dt= dot(co ,vec2(a,b) + float(tick) * vec2(0.0194161103, 0.0375151509));
    float sn= mod(dt,M_PI);
    return fract(sin(sn) * c);
  }
  