Sign in to follow this  

[web] Convolution filter divisor? (flash)

This topic is 4055 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4055 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this