Jump to content

Render glsl using PIXI.js


trishul1979
 Share

Recommended Posts

Hi,

 

I have just started learning pixi.js and have a query.

 

I would like to play/run GLSL code within Pixi but unable to find any example code for this.

 

for e.g. I would like to run similar code

http://glslsandbox.com/e#28499.0

 

I did looked at few examples but did not understand how to include this

http://pixijs.github.io/examples/index.html?s=basics&f=custom-filter.js&title=Custom%20Filter

 

Many thanks for any help.

Link to comment
Share on other sites

Create a filter, assign it to the "shader" property of a sprite. That is what you need to do, as for the shader itself it will not be a direct copy-paste. glslsandbox exposes some things to the shaders that pixi does not, and pixi exposes things that the sandbox does not. You will need to investigate how to get the values you need based on how they are being sent to the shaders on that site.

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