wayfinder Posted January 4, 2015 Share Posted January 4, 2015 Hi! I asked this question over in the PIXI forum and got a few good pointers but I'm at a bit of a loss right now. See the other thread here: http://www.html5gamedevs.com/topic/11450-most-performant-way-to-draw-a-blurred-polygon Basically, I need to draw a bunch of polygons, each with a separate blur value, to a renderTexture which will later be used in a filter (piped in there as a texture). I have tried the following: - using a bitmapData, drawing the polygon with fill() off-screen and abusing the shadow/shadowblur with a negative offset that basically only drew the shadow onto the bitmapData, which gave me exactly what I wanted in terms of results, but not in terms of performance. fill() was the bottleneck at ~ 50 times the cost of the next most expensive function call - setting up a renderTexture to be filled with a webgl renderer (i figured if i could offload the drawing onto the graphics card that would be great!) - i can draw stuff to that renderTexture and it will show up in the filter, great! but: once I add a blur filter, it all goes to hell: it gets super slow and the sprites that i put a filter on don't even show up on the renderTexture. Please he;lp? Link to comment Share on other sites More sharing options...
wayfinder Posted January 5, 2015 Author Share Posted January 5, 2015 I think that last part is what's irritating me most... that any object that has a filter applied will simply not render to the renderTexture. I found this jsfiddle that show that in theory it SHOULD be possible - but I have no idea why it doesn't work for me. http://jsfiddle.net/sD8Tt/17/ Link to comment Share on other sites More sharing options...
Recommended Posts