Applies a normal map to the filtered Object in order to displace pixels.
Uses red and green channels to displaces horizontal and vertical axes accordingly.
Constructor
new(normalMap:Tile, dispX:Float = 5., dispY:Float = 5., wrap:Bool = true)
Create a new displacement filter.
Parameters:
normalMap | The normal map used for displacement lookup. |
---|---|
dispX | Horizontal displacement distance in pixels. |
dispY | Vertical displacement distance in pixels. |
wrap | Wrap normal map around when lookup UV goes out of bounds. |
Variables
wrap:Bool
When enabled, the displacement map will wrap around when lookup reaches its edges. Otherwise out-of-bounds values are clamped to the border.