bQvle Posted September 23, 2015 Share Posted September 23, 2015 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): Any ideas why this is happending? Quote Link to comment Share on other sites More sharing options...
coolblue Posted September 23, 2015 Share Posted September 23, 2015 The stretching of the border pixels is due to texture wrap set to CLAMP_TO_EDGE. Quote Link to comment Share on other sites More sharing options...
bQvle Posted September 23, 2015 Author Share Posted September 23, 2015 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). Quote Link to comment Share on other sites More sharing options...
xerver Posted September 27, 2015 Share Posted September 27, 2015 Is your displacement map a power-of-two in size? Quote Link to comment Share on other sites More sharing options...
bQvle Posted September 28, 2015 Author Share Posted September 28, 2015 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. Quote Link to comment Share on other sites More sharing options...
xerver Posted September 28, 2015 Share Posted September 28, 2015 Hmm, can you setup a running example with a bug on GitHub so I can look into it and track it? Thanks! Quote Link to comment Share on other sites More sharing options...
bQvle Posted September 30, 2015 Author Share Posted September 30, 2015 Yes, sorry for the delay.. here is the codepenhttp://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 nicelyhttp://codepen.io/anon/pen/avpWMX Ill make a github bug aswell. Edit: Github: https://github.com/pixijs/pixi.js/issues/2133 Quote Link to comment Share on other sites More sharing options...
bQvle Posted October 20, 2015 Author Share Posted October 20, 2015 @xerver , have you had any time to look at this? Quote Link to comment Share on other sites More sharing options...
xerver Posted October 20, 2015 Share Posted October 20, 2015 I haven't, much too busy with work right now. I'm really sorry. Quote Link to comment Share on other sites More sharing options...
bQvle Posted October 21, 2015 Author Share Posted October 21, 2015 its okay, not like its stopping me ill check back later! Quote Link to comment Share on other sites More sharing options...
bQvle Posted February 13, 2016 Author Share Posted February 13, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.