[web] Convolution filter divisor? (flash)
Hi I have a question about a convolution filter that I'm applying in actionscript. Right now it's a basic blur filter, ie:
1, 0, 1,
0, 1, 0,
1, 0, 1
Every frame I draw a rectangle with a BitmapData called "pattern". I call pattern.applyFilter to apply the convolution filter to it, then do a basic bitmap fill and draw the rectangle.
My question has to do with the divisor used in the construction of the convolution filter. The default is supposed to be 1, but if i set the divisor to 1 it results in a solid color filling the rectangle. If I use 0 (which is supposed to be ignored and replaced with the default) I get the same solid color. If I omit the divisor, it works properly as a blur filter...
So wtf? Why can't I set the divisor to the default value and get the same result?
This answer may be totally missing the point and useless, but here goes:
Dividing any number by 1 will give you the original number.
Dividing any number by 0 will give you a result of infinity, which defaults to NaN or some such thing.
I would imagine matrix multiplication works similarly.
Dividing any number by 1 will give you the original number.
Dividing any number by 0 will give you a result of infinity, which defaults to NaN or some such thing.
I would imagine matrix multiplication works similarly.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement