Jump to content

DisplacementFilter padding


bQvle
 Share

Recommended Posts

Hi,

 

I'm trying to utialize filters to create visual-effects in my game.

 

But when I apply the filters to my stage, It offsets the entire picture, and streatches the border pixels. The effect plays as expected.

 

It looks like this (This is with displacementFilter.scale 200):

1R33a7b.png

 

 

Any ideas why this is happending?

Link to comment
Share on other sites

Yeah, I know how it looks when a single texture clamps, but this is a filter applied to my "stage" container.

Just a donut-shaped displacement map to illustrate kind of a shockwave effect.

 

All the elements you see in the picture is different textures (plane, tank, ground).

Link to comment
Share on other sites

Hi xerver,

 

Its intentionally not power of two, if i make it power of two the effect will Tile to the entire screen, i only want the shockwave to occur at a fixed location. 

 

but it still causes this border on my stage container, the border appears the second the filter is applied, and the border size changes with filter scale.

Link to comment
Share on other sites

Yes, sorry for the delay.. here is the codepen

http://codepen.io/anon/pen/EVZmvp

(click the background)

 

Here is a version where I animate the Displacement scale aswell, it shows the impact on the borderpadding nicely

http://codepen.io/anon/pen/avpWMX

 

 

Ill make a github bug aswell.

 

Edit: Github: https://github.com/pixijs/pixi.js/issues/2133

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...

Just wanted to let you know that the problem is gone. I had to make the background-color of my Displacement Filter texture #808080 (i dont know why, but maybe it should be written somewhere) :)

if i change the background color to black, The padding will be back.

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...