Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

displacement range for a DisplacementFilter

$
0
0

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!


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>