Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Pixijs - How do i remain sprite position while scaling displacement filter


up209d
 Share

Recommended Posts

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/ 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

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