graphics – Unintentional chromatic aberration on a lightmap

Some strange rainbow halos (front and left) appear after computation of a lightmap for direct light. The formula is dot * dot2 / ( dist * dist ) * dl->intensity with gamma correction, lightmap is computed as vec3_t and ultimately cropped to 3 bytes. However, brightness of the region in question fit into 255 nicely, and even calculating in byte instead of float beforehand – result in just a subtle “oil painting” effect and does not produce such artifact across entire image. My best guess is how this artifact appear from base change in a floating point math, but I don’t know for sure nor do I understand what exactly is happening.artifact