PHYSX GLOW

PhysX Glow is a real exponential glow following the inverse quare law. This means that this glow behaves just like real glow. Many glows claim to be exponential but the vast majority of them use a series of gaussian blur stacked to mimic an exponential glow. The problem with this method is that as it's name suggest the gaussian blur uses a gaussian matrix as a filter, whereas we want our filter to be an exponential decay. To do so I used the inverse suare law, which states that on a given surface the intensity of a light is proportional to the inverse of the sqare of the distance to the source. I created such a filter using this expression : 

 

        √(((Image_center.x - x) ^ 2) + ((Image_center.y - y)^ 2))

 

I then used a convolve to apply this matrix to every pixel in the image.