Jump to content

Hue/Saturation Filter


Recommended Posts

Being a newb myself, I shoudn't answer this - but I'll try anyways :-).


Looking at the documentation and the example, there doesn't seem to be a filter that supports hue.


But - looking at the Pixi source, I see that the filters are parameterized WebGL fragment shaders, for example:


It should be feasible to create a new filter to extend Pixi with a hue and saturation shader by looking into similar libs that have more examples of shaders like this great 'glfx' library:



One can see that the structure is very similar. With enough time and experimentation I can imagine that the mileage is not too big.

Link to comment
Share on other sites

dirkk0 is kind of right with his idea. There is already a webgl filter to accomplish hue. And the class itself is titled PIXI.ColorMatrixFilter ;) But as a webgl filter, this won't work with a canvas renderer.  Look here for the example: http://www.goodboydigital.com/pixijs/examples/15/index.html.

Regarding the canvas implementation of a color matrix filter: This seems to be an enhancement so you should better ask it the github repository I guess. https://github.com/GoodBoyDigital/pixi.js/


Regards George

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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...