codevinsky Posted April 11, 2014 Share Posted April 11, 2014 Can I modify sprite vertices with Filters like the bitmap data wobble example, but with webgl shaders? Link to comment Share on other sites More sharing options...
george Posted April 11, 2014 Share Posted April 11, 2014 I don't understand your question.You're talking about the 'wobble bitmapdata' example. And you want to do something like this with webgl shaders? So why no look at the wobbleFilter.js example ? It's a perfect example of using a webgl shader in PIXI on the basis of an AbstractFilter . And what do you mean with sprite vertices? There are vertices in physics not in a sprite? RegardsGeorge Link to comment Share on other sites More sharing options...
alex_h Posted April 11, 2014 Share Posted April 11, 2014 @george -> In WebGL shapes to be drawn are also defined using vertices. Link to comment Share on other sites More sharing options...
george Posted April 11, 2014 Share Posted April 11, 2014 Thanks Alex, I did not know about vertices in webgl. The question makes even less sense with this information. It seems that the OP mixed it up like me ? Link to comment Share on other sites More sharing options...
alex_h Posted April 11, 2014 Share Posted April 11, 2014 Thanks Alex, I did not know about vertices in webgl. If you want to familiarise yourself with the basics of webgl I highly recommend this website: http://learningwebgl.com/blog/?p=28 The link above goes to the page where it talks about vertices. george 1 Link to comment Share on other sites More sharing options...
rich Posted April 11, 2014 Share Posted April 11, 2014 Can I modify sprite vertices with Filters like the bitmap data wobble example, but with webgl shaders? Not at the moment, no. This isn't exposed on a Pixi level so it's not available from Phaser either. The biggest issue really is that you couldn't re-create the wobble example with a vertex shader because you've only got a few vertices per sprite to actually play with! Remember every sprite is just a quad, but for an effect like that you'd almost certainly need vertices for each line of pixels maybe? A whole stack of quads just to be able to use a vs on them. In order for vertex shaders to be useful there would need to be a way to break down a single sprite to use many vertices imho, and because it's all 2D anyway you can do pretty much anything you need with a fragment shader. Link to comment Share on other sites More sharing options...
Recommended Posts