anchor.diff:  	return vec4(res, dis);
   }
   
  -vec3 evaluateLight(vec3 pos, inout float dis)
  -{
  -	vec4 A = lightA(pos);
  -	vec4 B = lightB(pos);
  -	dis = min(A.w, B.w);
  -	return A.rgb + B.rgb;
  +vec4 lightUnion(vec4 a, vec4 b)
  +{
  +	return vec4(a.rgb + b.rgb, min(a.w, b.w));
  +}
  +
  +vec4 evaluateLight(vec3 pos)
  +{
  +	vec4 res = lightA(pos);
  +	res = lightUnion(res, lightB(pos));
  +	return res;
   }
   
   void addLightning(inout vec3 color, vec3 normal, vec3 eye, vec3 pos) {
  
positive.code: 	r.z = mod(pos.z, s) - s * 0.5;
  	r.y -=  0.7;
  	float sw = 3.0  - 1.5 * smoothstep(0.0, 6.0 ,abs(pos.z));
  	//dis += step(0, -abs(p.x) + s) * (s - abs(p.x));
  //	r.x -= sw * 1.1;
  	r.x = abs(r.x) - sw * 1.3;
  	vec3 slpos = r;
  	vec3 invLights = normalize(-slpos);
  	float diffuses = max(0.0, dot(invLights, normal));
  	float specs = specular(normal, -invLights, normalize(eye - slpos), 50.0);
  	float diss = length(-slpos);
  	float strs = 1.0/(0.5 + 0.01*diss + 0.1*diss*diss);
  
  	vec3 lpos = vec3(0,-1,1);//LPOS;//vec3(1, 1, -2);
  
  	float dis = length(lpos - pos);
  	vec3 invLight = normalize(lpos - pos);
  
negative.code: 			float m = res.y;
  
  			float fogAmount = 0.005;
  			vec4 lightColDis = evaluateLight(p);
  			vec3 light = lightColDis.rgb;
  			d = min(d, lightColDis.w);
  
  			vec3 lightIntegrated = light - light * exp(-fogAmount * d);
  			scatteredLight += transmittance * lightIntegrated;	
  			transmittance *= exp(-fogAmount * d);
  
  			t += d;		
  