   Bleed off point light DX10
  Hi all,I basically have a point light calculated in my FX file like so :float3 pointLight(SurfaceInfo v, PointLight L, float3 eyePos){float3 litColor = float3(0.0f, 0.0f, 0.0f);float3 lightVec = L.pos - v.pos;float d = length(lightVec);if (d > L.range)return litColor;lightVec /= d;litColor += v.diffuse * L.ambient;float diffuseFactor = dot(lightVec, v.normal);[branch]if (diffuseFactor > 0.0f){float specPower  = max(v.spec.a, 1.0f);float3 toEye= normalize(eyePos - v.pos);float3 R    = reflect(-lightVec, v.normal);float specFactor = pow(max(dot(R, toEye), 0.0f), specPower);// diffuse and specular termslitColor += diffuseFactor * v.diffuse * L.diffuse;litColor += specFactor * v.spec * L.spec;}return litColor /= dot(L.att, float3(1.0f, d, d*d));}This produces a okay looking light however with the statement saying if the surface is out of range then leave it black makes the light appear like a perfect circle on the surfaces.So I want to basically bleed of the intensity of the light as the distance increases, which sounds easy as I have the distance between the light and the surface, so I thought to just divide equal the litcolor by distance but this doesn't work. I'm sure its and easy one to fix, just want some ideas!Thanks all.   
  I believe what you are looking for is often referred to as attenuation. Try this://[...]float3 lightVec = L.pos - v.pos;lightVec /= L.range;float att = max(1.f - dot(lightVec, lightVec), 0.f);//[...]return litColor * att;I see that you seem to have something called L.att already. But I don't understand how you use it. You could give my suggestion a try and tell me what happens.   ;  Yeah that sorted it, I think I need to read over the lighting section once again in the book! Haha, thanks alot.   