Jump to content

Drop Shadow with no Blur


yonom
 Share

Recommended Posts

I want an unblurred drop shadow.

Essentially, every pixel's color should be replaced with the drop shadow color and the alpha value should be multiplied by the shadow's alpha value.

 

Is this possible with the DropShadowFilter? I tried setting blur: 0 on that one but it still seems to blur my shadows a bit.

Link to comment
Share on other sites

Its trivial if you know how to make filters. It certainly is easier than https://pixijs.io/examples/#/filters-advanced/pixie-shadow-filter.js , you just need simple shift of vTextureCoord.

As for pixi-filters dropShadowFilter - im not sure, you have to look inside its sources to determine whats wrong with blur:0

Alternatively, if you use it only on one sprite , its better to just use extra sprite with tint=0, alpha=0.5 and position shift - its simpler and faster, no need of framebuffer switch.

If you still want to use filter but you have problems with coding it, i can help in weekend.

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