Jump to content

displacement range for a DisplacementFilter


rip
 Share

Recommended Posts

Hi,

How do the scaleX, scaleY values affect the range of displacement for a DisplacementFilter?

From what I've read the displacement map represents a range of displacement from -.5 to +.5 on an RBG scale of 0 to 255.

How is scale applied to these values?

For example, if a displacement map has a range of values of 64 to 160 in both the red and green channel and scaleX and scaleY are both 100, should I expect a displacement range of 100x, so +12.5px to -25px for both x and y?

Also, how does padding affect the displacement range?

If padding is also 100 and the original sprite is 100x100, what will the width and height of the displaced sprite be?

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...