                         for x in min_x...max_x {
                             
                             let _k = Float64ColorPixel(_kernel.pointee)
-                            let w = exp(_c0 * Double(x * x + y * y) + _c1 * dot(_p, _k))
+                            let w = exp(_c0 * Double(x * x) + _c1 * Double(y * y) + _c2 * dot(_p, _k))
                             
                             s += w * _k
                             t += w

            
            for j in 0..<height {
                
                let min_y = max(0, j - _r) - j
                let max_y = min(height - 1, j + _r) - j
                
                for i in 0..<width {
                    
                    let min_x = max(0, i - _r) - i
                    let max_x = min(width - 1, i + _r) - i
                    
                    var kernel = texture + min_x + min_y * width
                    

            
            for j in 0..<height {
                
                let min_y = max(0, j - _r1) - j
                let max_y = min(height - 1, j + _r1) - j
                
                for i in 0..<width {
                    
                    let min_x = max(0, i - _r0) - i
                    let max_x = min(width - 1, i + _r0) - i
                    
                    var kernel = texture + min_x + min_y * width
                    
