up209d Posted May 21, 2016 Share Posted May 21, 2016 Hi everyone, I m doing some work with filter feature of Pixi. I tried to increase the visibility of the displacement filter by setting displacement filter scaling. However, when i do that, the background sprite which is affected by the filter also moved to bottom right direction. I want to remain that position but cannot found a solution. Is there anyone can help me this issue? Thank you so much. Here s the fiddle. You can see while scaling the filter, background sprite also is moving but i want to keep it stay till in the middle of screen. http://jsfiddle.net/yrgox8h4/ Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 21, 2016 Share Posted May 21, 2016 Yep, its a new bug! Something with matrix calculation in filterTransforms UPD. I'm wrong Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 21, 2016 Share Posted May 21, 2016 Not a bug. Your displacement map (texture) is wrong. Color 0x808000 is "no displacement", and most of your displacements are actually moving image to top-bottom. Of course when you change displacement scale, the image moves to top-bottom even more. Use Red component to indicate X shift, and Green for Y May be its actual normal map and not displacement map? up209d 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 21, 2016 Share Posted May 21, 2016 Do you see that when image is not displaced at all (scale=0), its in the center of screen, and any displacement moves it to right-bottom? up209d 1 Quote Link to comment Share on other sites More sharing options...
up209d Posted May 21, 2016 Author Share Posted May 21, 2016 45 minutes ago, ivan.popelyshev said: Not a bug. Your displacement map (texture) is wrong. Color 0x808080 is "no displacement", and most of your displacements are actually moving image to top-bottom. Of course when you change displacement scale, the image moves to top-bottom even more. May be its actual normal map and not displacement map? Rogue ! I just change the proper texture file and everything works fine. So sorry cuz i m brand new to this area. Now i understand more about how displacement map texture work. Cheers. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 21, 2016 Share Posted May 21, 2016 Just now, up209d said: Rogue ! I just change the proper texture file and everything works fine. So sorry cuz i m brand new to this area. Now i understand more about how displacement map work. Cheers. =^_^= up209d 1 Quote Link to comment Share on other sites More sharing options...
up209d Posted May 21, 2016 Author Share Posted May 21, 2016 24 minutes ago, ivan.popelyshev said: =^_^= Thank Ivan, follow your guide i have exactly what i want. Hope you have a good weekend. http://jsfiddle.net/yrgox8h4/ ivan.popelyshev 1 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.