tackle Posted December 22, 2013 Share Posted December 22, 2013 I love the new fire filter example. I'm thinking it would be awesome to make some sort of flamethrower/similar, or at least fiery fireballs that can be thrown by a wizard. I've used Phaser for about 30 minutes so bear with me - from what I've gathered you apply filters to sprites.I'm trying out a simple emitter (the diamond burst from the samples) and I can easily forEach through them and apply the fire filter. The 'problem' is that they all share the same filter and don't act as individual entities with their own sense of 'fire'. I understand this makes perfect sense within the realm of GLSL and filters, but these concepts are quite tricky for me to wrap my head around. I'm wondering if anyone has any hints on how to 'individualize' filter effects. It would be awesome for a lot of things: 1. Fireballs, streams of lava and other fiery goodness2. Displacement effect as the heat exhaust of a jet fighter in a shoot'em up The second idea is a different beast I suppose - imagine a Tyrian clone and you have a top down view of a ship. You'd want something like a diminishing cone of displacement firing out of the engine of the aircraft. Leads me to the question.. where does the GLSL end and Phaser begin? Perhaps it's necessary to learn to create your own shaders to really get control of this - I have no idea Link to comment Share on other sites More sharing options...
rich Posted December 22, 2013 Share Posted December 22, 2013 Right that's the thing really - you can't think of a filter as being like a texture for a Sprite, it's more of a global 'scene' based effect. That doesn't mean it can't only effect certain objects, but it's all down to how the shader has been written really. tackle 1 Link to comment Share on other sites More sharing options...
tackle Posted December 22, 2013 Author Share Posted December 22, 2013 I'll have a look at making shaders. Gonna need a way to feed the filter position data and similar. Link to comment Share on other sites More sharing options...
rich Posted December 22, 2013 Share Posted December 22, 2013 Sure, that's the easy bit - you'd just set-up a bunch of uniforms and feed it in the update loop. Actually applying that to the shader is where the magic begins though Link to comment Share on other sites More sharing options...
Recommended Posts